Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox ControlSource
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00547009
Message ID:
00547036
Vues:
9
>>>>>>I have a listbox on my form. The RowType is 5 (array). My problem is that based on certain criteria the RowSource can change. So, I change the RowSource and Requery but once I have changed the source the Listbox always remains blank. When I look at the RowSource while the form is running it does change the RowSource but the display doesn't work. What am I missing?
>>>>>
>>>>>I assume that new RowSource is also array. Is it possible that new array isn't visible to listbox because it's local? BTW, it'should work w/o requery().
>>>>
>>>>Correct, the other RowSource is also an array. Both arrays are properties of the form. I didn't think it would need a requery but don't understand why the listbox stays blank after changing the RowSource.
>>>>
>>>>For instance, when I load the form the listbox has 4 rows in it and these are visible. I click a button and this fires of the change of RowSource. The Listbox goes blank and refuses to show any values after this.
>>>>
>>>>BTW, this is VFP 6, SP 5.
>>>>
>>>>TIA for any help
>>>
>>>Stupid question: maybe new rowsource array is empty?
>>
>>Nah, never a stupid question. You never know what I might overlook. I thought about this though and made sure that both arrays were populated and tested again. Same results. Thanks for the try though.
>
>What would happend if you switch those arrays just for testing?

Good idea. I did that. It seems that whatever controlsource it has during init works just fine but if you try to change it it never displays again. I guess I am going to have to play with Add and Remove Object and see if passing in a controlsource to the init will work. Grrr...this shouldn't be so difficult :)
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform