Combo Boxes
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 checkbox, 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.
The list is provided via a TreeModel, and columns from this model are added to the ComboBox's view with the ComboBox::pack_start() method. This provides flexibility and compile-time type-safety, but the ComboBoxText class provides a simpler text-based specialization in case that flexibility is not required.
- 10.1. The model
- 10.2. The chosen item
- 10.3. Responding to changes
- 10.4. Full Example
- 10.5. Simple Text Example
- 10.6. ComboBox with an Entry