Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preselecing t Items in a ListBox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00393757
Message ID:
00394123
Views:
12
>How can I preselect Items in a ListBox on a form to display as Selected when the Form Loads
>
>The Following does NOT work
>
>nCount = THISFORM.LstID.ListCount
>FOR n = 1 TO nCount
> THISFORM.LstID.Selected(n) = .T.
>NEXT
>
>Note : THISFORM.LstID.RowSourceType = 2 Alias
>and THISFORM.LstID.MultiSelect = .T.

You must either put your code in the form's Activate method, or, if it's in the form's Init, you must have a THIS.SETFOCU() in the Init of the listbox.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform