Notifications
Clear all

[Closed] multilistbox selected names problem

hi ,
iam just trying to put a multilist box and storing some names and using selected obj in
some other functions …
but i am not able to retreive the names of selected objects

as in multilistbox there is no property like .selected in other listboxes…

ex.
on multListBox0 selected i do
(
morpharr1=multListBox0 .items— storing initial name here

 mor_num1=multListBox0 .selection -- storing selected items in array

 --now i wanna the names of selected objects  


               --like in dropdownlist we are using .selected 

 )

i need the names as iam wiring the selected objects with a slider…
— one more thing if i had list having names like 1.sphere01,2.sphere02 3.sphere03 4.spher04
if i select first and 3rd i get output from mor_num1=multListBox0 .selection
as #(1,3) i wanna have names of first and third obj like sphere01 and sphere03
but if i select 1 2 and 4 it comes like (1…2,4)

— and if i wanna use mor_num1.count and select only first object then also it shows count as 4 the total no of objects in the list…

— finally i wanna store the selected objects name as iam using it how can it be possible???

akesh

1 Reply

Hi Akesh,

This will give you the values (names) of the selected items:

selNames = for i in multListBox0.selection collect multListBox0.items[i]

Martijn