Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiselect in Listbox
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00058541
Message ID:
00058557
Views:
29
>We have a listbox populated with a read/write cursor, ranging from 100 to 2-3000 records. The user wants to know how many items have been selected using the Shift-click and Ctrl-click methods.
>
>Any suggestions? Am I missing something obvious?
>
>TIA
>Barbara

In the Click event on the listbox place the following code:

nSelected = 0
FOR x = 1 TO This.ListCount
IF This.Selected(x)
nSelected = nSelected + 1
ENDIF
NEXT

*-- Shows the number of selected records to the user
Thisform.SelectedNo.Caption = STR(nSelected)
Benn Kjaer
MS Certified Professional - Visual Foxpro

"There is something rotten in the state of Denmark"
"Why make user-friendly programs, when there aren’t any friendly users :o)"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform