But in max 2008 and max 9 this method doesn't work. Its says "No method found which matched argument list"
Anyone knows how to add those items to listbox?

Gravey

02-10-2009, 07:12 AM

in max 9 / 2008 you need to supply a system.string rather than a max string so your code would be stringArray = #("Item1", "Item2", "Item3", "Item4", "Item15")
ListItems = for s in stringArray collect dotNetObject "System.String" s
dotNetControl lv "System.Windows.Forms.Listbox"
lv.items.addrange listitemsit's annoying but if your coding for pre-2009 then that's the way you have to do it

pchela1313

02-10-2009, 07:20 AM

Thanks, for your reply.
I have just found this solution, and I was writing it, but you were faster. Thanks again for answer :)

CGTalk Moderation

02-10-2009, 07:20 AM

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.