DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

List box - how do I save the names of items selected by mouse?

Hi,

 

I have a created a dialog with a list box.  Using script, I want to load it with all the channel names from a group and then manually select some of these channels with the mouse (multiselection mode) and store them in an array.

 

Using script, I can load the channels, select some or all them and store them in an array.  However, I do not know how to store manually selected channels in an array.   In other words, how to get highlighted channels into an array? 

 

Any help is gratefully appreciated.  Thanks.

0 Kudos
Message 1 of 3
(5,614 Views)

Hi,

 

You just need to acces to the multiselection() method of the ListBox.

 

So you just need.

Dim i For i =1 to ListBoxObj.Multiselection.Count Msgbox ListBoxObj.MultiSelection.Item(i).Text Next

 and Actually ListBoxObj.Multiselection is already a collection, so you can used or reasigned to a new array variable.

 

Regards,

 

0 Kudos
Message 2 of 3
(5,596 Views)

Thank you Naoa!

0 Kudos
Message 3 of 3
(5,583 Views)