Rozbalovací seznamy (ComboBox)

The ComboBox widget offers a list (or tree) of choices in a dropdown menu. If appropriate, it can show extra information about each item, such as text, a picture, a check button, or a progress bar. The ComboBox widget usually restricts the user to the available choices, but it can optionally have an Entry, allowing the user to enter arbitrary text if none of the available choices are suitable.

Seznam je poskytován přes objekt TreeModel a sloupce tohoto modelu se přidávají do objektu ComboBox, který provádí zobrazení, pomocí metody ComboBox::pack_start(). Poskytuje to pružnost a typovou bezpečnost při kompilaci. Pokud ale tyto vymoženosti nejsou zrovna zapotřebí, je k dispozici zjednodušená třída ComboBoxText specializovaná čistě na textové položky.

Reference