Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to know a ListItem in ComboBox is disabled?
Message
De
23/08/2019 11:45:03
 
 
À
23/08/2019 11:27:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01670243
Message ID:
01670283
Vues:
75
>>I am populating the combo box via a method I wrote for the subclass that populates it from a two-dimensional array, one column the DisplayValue the other the Value (key to match to linked data).
>
>
>Add more columns to the combobox or listbox. Then set the widths of the columns via the ColumnWidths property as 120,0,0 (for three columns the first is 120 pixels wide and the others are zero) and set the ColumnLines to False (.F.) to not show a line between columns. Now add the rows to the combobox but add a coded value to the second, third, etc. columns that your program needs. This can be the Id value of the DisplayValue and indicate if the row is disabled. Then you also do not need the array any longer -- the combobox has all the data needed.

... and make sure that when you're assigning the additional column values that you prepend the "\" to disabled item text (especially if these are being assigned after the actual displayed item). Basically if you're assigning additional columns and forget to prepend the "\" the item will get enabled again.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform