Forum > LCL

TComboBox multiple columns

(1/4) > >>

xinyiman:
How can a TComboBox use two or more columns in one row?

JuhaManninen:

--- Quote from: xinyiman on July 15, 2010, 09:53:58 am ---How can a TComboBox use two or more columns in one row?

--- End quote ---

This seems to work:

--- Code: ---  ComboBox1.Items.Add('First '#9' item');
  ComboBox1.Items.Add('Second '#9' item');
  ComboBox1.Items.Add('Third '#9' item');

--- End code ---

Tested with GTK2 and QT bindings, Linux, Lazarus trunk.
Some 3rd party components may have more advanced features.

Juha

xinyiman:
Windows not working properly, but then I wish the lines were aligned in various fields! is it possible? View image!

JuhaManninen:

--- Quote from: xinyiman on July 15, 2010, 11:24:58 am ---Windows not working properly, but then I wish the lines were aligned in various fields! is it possible? View image!

--- End quote ---

Does it happen also with the Lazarus 0.9.29 trunk version on Windows?

Juha

zeljko:
Under qt it's possible by adding another list class (TQtTreeWidget instead of TQtListWidget) and set number of columns, but it's hack.
Normally TComboBox does not have multicolumn support, but you can use your own drawn combobox and format lines as you wish.

Navigation

[0] Message Index

[#] Next page

Go to full version