Reputation: 155
I made a user interface with a ComboBox. I'm using glade so I'm doing the following at runtime
combo_box.set_model(liststore)
cell = gtk.CellRendererText()
combo_box.pack_start(cell,False)
combo_box.add_attribute(cell,'text',0)
And when I click on the ComboBox the cellrenderer takes up all the vertical space of the screen. However, if I limit the number of items in the liststore, and the cellrenderer does not need a to scroll, the problem disappears.
Here's a picture of the problem:
What is happening?
Thank you for your time.
Upvotes: 1
Views: 182
Reputation: 451
From what I know this is in GTK+ by design (though I have no references, and could equally be completely wrong). The idea is that when you have a list of items in a ComboBox or Menu, which forces the list off the screen. GTK+ makes a decision to place the first item both at the top of the list, and beneath you mouse cursor.
This means that you have the scrolling effect to reach items at the bottom, which GTK+ indicates by creating scrollable whitespace.
The easiest way around this is to structure the items into submenus, but this again could fall over on a small-sized screen.
Upvotes: 1