Hey guys. I am having trouble returning the value of multiple items that are selected in a list view gadget. I set coded this to spike out the listview gadget and it does not appear to function as I had thought after reading the description of it in the help file.
Code: Select all
index=GetGadgetState(#list)
If index <> (-1)
Debug index
GetGadgetItemText(#list, index, 0)
SetGadgetItemState(#list, index, 0)
index=0
Debug index
index=GetGadgetState(#list)
Debug index
EndIf
What I am trying to do is select 2 or more items in the listview and cycle through them. I need to get the values of the selected items. I tried to check whether or not an item was selected by the first assignment of index. Then it spits out the numerical value of index and tries to get the text out at that position. Next I de-select the original item. Now here is the first big issue. When I de-select it, it does in fact de-select the item at index. However, if I try to do another check for the next selected item at the next assignment statement for index it returns the original value which should have been de-selected and currently shows up as de-selected in the gadget. How can you loop through these items?