Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Want One Listbox to control content of another listbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00399962
Message ID:
00399976
Vues:
11
>>I have a tablelistbox that has all the available tables. As you click on a table or cursor through the tables, i want the columnlistbox to show the column names for that table. The tablelistbox is working well on its' own. But I am having trouble with the code and where to put the code for it to change the columnlistbox. I have columnlistbox.RowSource = thisform.afieldsarray and columnlistbox.RowSourceType = 5 in the properties. I put "thisformset.afieldscnt = afields(thisformset.afieldsarray)" in columnlistbox.init, but the columnlistbox is blank. In the debugger I can see that thisform.afieldsarray is populated with the correct values, but the columnlistbox never shows any values.
>>

>Brenda, do you have in your code
>
>columnlistbox.Requery()
>columnlistbox.Refresh()
>
>after you fill your array?

I knew there was something else to do, it was the Requery. Looked all through the properties but saw nothing that clicked. What method for tablelistbox should I put my

thisform.afieldscnt = afields(thisform.afieldsarray)
thisform.columnlistbox.Requery()
thisform.columnlistbox.Refresh()

Tried in the tablelistbox.WHEN, but got me in trouble because in the form1.INIT i tablellistbox.SETFOCUS, which calls the WHEN, and the WHEN does not like me referencing the columnlistbox during the INIT.

Brenda
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform