Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selected Item in a Listbox store item number to form val
Message
 
To
07/04/2004 11:01:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00892932
Message ID:
00892935
Views:
24
This message has been marked as a message which has helped to the initial question of the thread.
Perhaps List.ListItemID is what you are looking for.

>When I click on an item in a listbox to select it, I am storing the value in the listbox to a variable. I would also like to store the listbox item number to a form property to determine which item was selected instead of stepping through the listbox as it is now (see code below). In other words, I do not allow multiselect on the listbox and I want to know what the 'nCnt' (see nCnt var below) value is when I click on an item. Is there anyway to determine that?
>
>
>nCnt = 1
>DO WHILE nCnt <= THIS.Parent.lstSource.ListCount
>   IF THIS.Parent.lstSource.Selected(nCnt)
>      THIS.Parent.lstSelected.AddItem(THIS.Parent.lstSource.List(nCnt))
>      THIS.Parent.lstSource.RemoveItem(nCnt)
>   ENDIF
>ENDDO
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform