Combo/List box with 2 columns!
There is another property of the combo called .ItemData.
It is an array of long integer values with the same number of items as a list/combo control's List property.
You can use the numbers associated with each item to identify the items in a list or combo box.
For example, you can use an employee's identification number to identify each employee name in a ListBox control.
cboMine.AddItem sText
cboMine.ItemData(cboMine.NewIndex) = lData
you can write a small routine to access both pices just like a collection.
cboMine.AddData sText,lData
wow! this works too nice. The only problem is displaying them, and of course if you need 2 columns of text. There's all kinds of code around to do the display portion.
I hope this helps anyone looking for a visual dictionary control.
P.S. If anyone's interested, I have the full code for displaying and getting all in a class.
Gary
The door to life is never locked, but few have the knowledge to open it.
There is another property of the combo called .ItemData.
It is an array of long integer values with the same number of items as a list/combo control's List property.
You can use the numbers associated with each item to identify the items in a list or combo box.
For example, you can use an employee's identification number to identify each employee name in a ListBox control.
cboMine.AddItem sText
cboMine.ItemData(cboMine.NewIndex) = lData
you can write a small routine to access both pices just like a collection.
cboMine.AddData sText,lData
wow! this works too nice. The only problem is displaying them, and of course if you need 2 columns of text. There's all kinds of code around to do the display portion.
I hope this helps anyone looking for a visual dictionary control.
P.S. If anyone's interested, I have the full code for displaying and getting all in a class.
Gary
The door to life is never locked, but few have the knowledge to open it.