Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Initially select all items in listbox.
Message
From
06/01/1998 07:30:02
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00069682
Message ID:
00069773
Views:
41
>Well, just shot a whole day attempting what seems to be a simple problem.
>
>Have a list box control with a SQL Select for the data in the control.
>
>I want to be able to have ALL items in the listbox inititally selected when the form is instantiated.
>
>I put code in the init event of the listbox
>FOR m.i = 1 TO THIS.Listcount
> THIS.Selected(m.i) = .T.
>ENDFOR
>
>and I can step through it and see the rows get selected but when the form is activated all of the selection disappears.
>
>thanks, kim

Hi Kim,

This is a documented problem with VFP 5.0. See MS KB article Q161730. MS's workaround was to place the code in the Activate method of the form. However, my tests indicated even this would not work for multiple selections. I wound up using a multi-select grid or mover type list boxes.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform