Barbara,
Back in the July or August issue of FoxPro Advisor there was an article about smart or intelligent listboxes, and I think one of the things it did (or could be adapted to do, I'm sure) is what you need.
As I remember it, the function was origianlly developed to get around a VFP 3.0 problem limiting Lists to 60 items, but had other benefits so was continued even after the fix was done by MS.
It essentially used an array to keep track of selects/deselects.
Good luck,
Jim N
>>>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)
>
>Thanks, Benn, that would do it, of course. I should have put in the previous message that I was trying to avoid this method, because I often have 5000 records, and doing this loop each click would be abominably slow.
>
>I thought perhaps someone knew how Explorer and similar Win95 functions handle this.
>
>Barbara
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only