Re: Combo with multiple columns of text




On Jul 11, 2005, at 9:41 PM, Daniel Kasak wrote:

I'm currently using Gtk2::ComboBoxEntry widgets that are based on a
model that has an ID column and a text description column. I set the
text column with:

$widget->set_text_column(1);

Is it possible to get the ComboBox widget to display multiple columns of data, ie from column 1 and 2, separated from each other and aligned nicely?

You can pack as many cell renderers as you want into a ComboBox or ComboBox entry. (ComboBox implements the CellLayout interface.)

However, it appears that while ComboBox will use your cell renderers to draw the selected item in the ComboBox's normal state, the ComboBoxEntry uses a text Entry, so the cell renderers are used only for the menu.

note: this is based on poking around for a grand total of three minutes. I may be wrong.



--
I think it worked on the Wiley Coyote model of project management - if
at any point you looked down and realised what you were doing was
impossible then you'd instantly fail.
  -- Simon Wistow




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]