Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox woes
Message
From
28/12/2000 13:19:38
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00457316
Message ID:
00457447
Views:
36
>>>>I have a multi-selectable listbox on my form that I want to pre-fill when the form is loaded. I do this in the Init of the form, but by the time the form is activated the listbox has lost its values. Is there a better way of doing this? I don't know why it's losing its values.
>
>>>Are you using an array as your source? If so, it will lose scope when you leave the init of the form. Make the control source for the box an array that is a property of the form or a cursor.
>
>>Actually, the source is 6-Fields. It's coming straight from a table.
>
>Hello, Elyse.
>
>When you said that you pre-filled the listbox, we supossed that you were populating it item by item somehow.
>
>This have to work. Can you copy the init code? The only properties you have to set are: RowSource, RowSourceType, and Multiselect.

Okay, I think I've narrowed down the problem, but I still can't solve it. My listbox loads properly with data from my table. I select multiple items and all is well. But if I deactivate and re-activate the form (i.e. by selecting another form and returning to the first one), the previously selected items in my listbox are no longer selected. How can I keep the items selected?
Elyse Pomerantz
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform