tags:

views:

258

answers:

1

I'm just getting started with pyGtk programming, so bear with me. I have a dialog with a ComboBox. The list that shows up when I click on the combo box has 70+ times in it. It extends from the top of the screen to the bottom. I can live with it, but I'd rather have the ComboBox perform like an html select element(i.e. top of menu is at the combo box and extends down). Is there some inherited property that I can set or something? I'm not seeing anything in the API reference that has helped me so far.

+1  A: 

You can use a gtk.ComboBoxEntry instead of gtk.ComboBox. I have tested a ComboBoxEntry with 100 items and it works how you want. The downside is that the user will be able to type whatever they want into it, but you just need to validate the input before you do anything with it. On the upside you could implement auto-complete. I have seen font selection done this way.

DoR