Maxscript dotnet

Hi Guys,

I'm working on a script which uses a dotnet form for the UI. One of the elements is a ListView. When trying to get it to select one of the items I get an error. I'm basing a lot of it around:
http://scriptattack.com/snippets/snippets.html

Although I have to call functions like this:

fn Shot_lb_Get Shot_lb evnt =
(
hit=(Shot_lb.HitTest (dotNetObject "System.Drawing.Point" arg.x arg.y))
row=hit.item.Index
)
dotnet.addEventHandler Shot_lb "MouseUp" Shot_lb_Get

Does anyone have an idea why it fails?

John

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture
pixamoon's picture

select in ListView

Hi,
Do you want to select by script one item/line of listView or get selected line/lines?

Like in http://www.scriptspot.com/3ds-max/scripts/bitmap-tracking-resizing
or http://www.scriptspot.com/3ds-max/scripts/library-track-relink

to get selecttion count:
lv_objects.selecteditems.count

to get first selected item:
lv_objects.SelectedItems.item[0].subitems.item[0].text

to select 1st on the list:
lv_objects.Items.item[0].selected = true

where lv_objects is dotnet ListView

Hope it helps
Pixamoon

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.