Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know a ListItem in ComboBox is disabled?
Message
From
23/08/2019 11:45:03
 
 
To
23/08/2019 11:27:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01670243
Message ID:
01670283
Views:
74
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform