You can easily achieve a multicolumn effect in a listbox by setting the TabWidth property of TListbox. For example, http://delphi.about.com/cs/adptips2000/a/bltip1200_3.htm
I need to do the same in the drop down list of a ComboBox, but comboboxes don’t publish any TabWidth property.
Any ideas?
In a comment to this answer advising you to owner-draw the list box items you say:
A combo box is actually composed of three native child windows – the combo box itself, an embedded edit, and a list box. You can use the
GetComboBoxInfo()function to fill aCOMBOBOXINFOstructure (i.e. aTComboBoxInforecord) with information about the control, and it will return the 3HWNDelements in it. With that you are able to alter the appearance and behaviour of the list box. In principle.For the list box to use the tab stops it needs to have the
LBS_USETABSTOPSstyle flag set. Unfortunately this can’t be turned on later, the list box has to be created with it. So you could use the functionality only if you were able to turn the style flag on for the list box, which is created during theCreateWindowEx()call for the combo box. AFAICS this can only be done by hooking theCreateWindowEx()call itself, identifying the internal call that creates the list box, and altering the passed style. This means runtime modification of code, and not in your executable but in a Windows DLL.Owner-drawing the list items looks like it would be much easier.