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:
00393759
Views:
14
>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.

Actually it resets when doing it in the Init event of the form but it works when all controls has been activated. Try to have a command button and in the click event, put your code, it works.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Reply
Map
View

Click here to load this message in the networking platform