Re: ComboBox in Toolbar




On Sep 3, 2006, at 12:06 PM, Dieter Schicker wrote:

I designed a window with a toolbar on top (see attached screenshot)
which contains a combo box. When you look at the screenshot you can see
that the height of the combo box is different from e.g. the height of
the text entry. How can I achieve that the combo box has the same height as the other toolbaritems? I already tried setting the height explicitly
but with no success.

That's a trick question! Your problem is that the combobox *is* taking the height of the other toolbar items. The toolbar items are essentially packed into a horizontal box, which manages the horizontal space but allots all vertical space in the box to children. The Entry centers its content within its vertical space, but the ComboBox does not --- since your ComboBox's CellRenderer may want to do something big, the ComboBox just fills the available space. (I think this changed a couple of versions ago.)

So, as icky as it may seem, try placing the ComboBox inside an Alignment.


--
I like drawing and painting. If you make something really weird, that means "abstract".
  -- Some kid on a PBS kid's show.






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