Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I select all in a list box...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00487657
Message ID:
00487660
Views:
12
>I have a list box and I like to have a button on my form that will select all items in the list box.
>
>Is there a method to do that.

If you got a list box class, add the following code in a custom method
LPARAMETER tlSelected
* Parameter is the Boolean value to
* assign to all items
LOCAL lni
ThisForm.LockScreen = .T.
FOR lni = 1 TO This.ListCount
  This.Selected(lni) = tlSelected
NEXT
ThisForm.LockScreen = .F.
This will select or unselect all depending on the value of the parameter passed.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform