Seite 1 von 1
Maxscript: MSComctlLib.ListViewCtrl doesn' work
Verfasst: 21.12.2009, 11:20
von Simon
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
Re: Maxscript: MSComctlLib.ListViewCtrl doesn' work
Verfasst: 10.02.2010, 10:21
von Simon
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];