MSComctlLib.ListViewCtrl seems to produce problems under newer max version & 64bit windows. Use dotNet! Good Tutorials how to the the ListView running:
http://paulneale.com/tutorials/dotNet/l ... ingColumns
http://blog.duber.cz/3ds-max/farewell-activex
Maxscript: MSComctlLib.ListViewCtrl doesn' work
Moderator: Falk
Maxscript: MSComctlLib.ListViewCtrl doesn' work
{o,o}
|)__)
-"-"-
O RLY?
|)__)
-"-"-
O RLY?
Re: Maxscript: MSComctlLib.ListViewCtrl doesn' work
dotNetControl actx1 "System.Windows.Forms.ListView"
clear list
actx1.items.clear();
CAREFUL! CLEAR means, that listbox loses the selection & focus!
get selected items
entries = actx1.selectedIndices;
for t=0 to entries.count-1 do
...
get item
actx1.items.item[1].subitems.item[4].text
add item color
actx1.items.item[0].Backcolor = (dotNetClass "System.Drawing.Color").fromArgb 255 0 0
add subitem color
myItem = dotNetObject "System.Windows.Forms.ListViewItem" ""; --Vertexcolor
myItem.UseItemStyleForSubItems = false;
myItem.Backcolor = (dotNetClass "System.Drawing.Color").fromArgb vert[1] vert[2] vert[3];
submyItem = myItem.SubItems.add ""; --Illumination
submyItem.Backcolor = (dotNetClass "System.Drawing.Color").fromArgb illum[1] illum[2] illum[3];
clear list
actx1.items.clear();
CAREFUL! CLEAR means, that listbox loses the selection & focus!
get selected items
entries = actx1.selectedIndices;
for t=0 to entries.count-1 do
...
get item
actx1.items.item[1].subitems.item[4].text
add item color
actx1.items.item[0].Backcolor = (dotNetClass "System.Drawing.Color").fromArgb 255 0 0
add subitem color
myItem = dotNetObject "System.Windows.Forms.ListViewItem" ""; --Vertexcolor
myItem.UseItemStyleForSubItems = false;
myItem.Backcolor = (dotNetClass "System.Drawing.Color").fromArgb vert[1] vert[2] vert[3];
submyItem = myItem.SubItems.add ""; --Illumination
submyItem.Backcolor = (dotNetClass "System.Drawing.Color").fromArgb illum[1] illum[2] illum[3];
{o,o}
|)__)
-"-"-
O RLY?
|)__)
-"-"-
O RLY?