General information
Category:
Forms & Form designer
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only