[Closed] Understanding Listview, need some help.
ok, now I get it. I had to compare my collected items array with “v_objects.ListItems.count”, now it works.
on sel pressed do
(
ObjIsol = for i in lv_objects.ListItems where i.Checked != true collect i.text
if ObjIsol.count < lv_objects.ListItems.count then
(
for e = 1 to ObjIsol.count do
(
deselectNode (getnodebyname ObjIsol[e] )
)
)
else messageBox "Kein Objekt zu isolieren"
)
Now Im making my script a little more comlex opening a new rollout with an ItemClick event, whitch will show me a little preview of the bitmap files from diffuseMap and selfIllumMap of the clicked item. It looks like this.
-- "lv_objects" is my activeXControl lv_objects "MSComctlLib.ListViewCtrl"
on lv_objects ItemClick item do
(
objNode = getnodebyname item.text
rollout itemProp (item.text as string) -- it shows me the name of the selected item
(
label l1 "" align:#left
bitmap diffMap filename:"" width:100 height:100
on itemProp open do
try
(
l1.text =objNode.material.diffuseMap.bitmap.fileName as string -- it works fine, it recognizes fine the "objNode" variable. Test propouse
diffMap.filename = objNode.material.diffuseMap.bitmap.fileName -- it works fine just the first time I evaluate the script, after it , it doesnt show anything else
)
catch()
--on itemProp close do (objNode = undefined)
)
try(destroyDialog itemProp)catch()
createDialog itemProp 200 600 style:#(#style_toolwindow, #style_titleba, #style_sysmenu) pos:(GetDialogPos objList_rollout + [220,0])
)
It still doesnt work fine.
As I commented on the script, it shows me the preview just the first time after I evaluate the script, after it , it doesnt show anything else. No error eather. I can close the main Floater and run it again, but nothing. I have to evaluete the script again and then the first time works fine.
I have two ideas what it might be. Or it cant clear a variable or have nothing to do with the script and its a limitation from 3dsmax that can update the pic on the fly.
The label, by the way, it update it without problem them every time I click an item.
Any ideas?
im afraid that the problem is that rollout.bitmap only support .bmp files and not jog or tga, or?