Combo Boxes

The ComboBox and ComboBoxEntry widgets offers a list (or tree) of choices in a dropdown menu. If appropriate, they can show extra information about each item, such as text, a picture, a checkbox, or a progress bar. The ComboBox widget restricts the user to the available choices, but the ComboBoxEntry contains an Entry, allowing the user to enter arbitrary text if the none of the available choices are suitable.

For both widgets, the list is provided via a TreeModel, and columns from this model are added to the ComboBox's view with the ComboBox::pack_start(). This provides a great deal of flexibility and compile-time type-safety, but the ComboBoxText and ComboBoxEntryText classes provide a simple text-based specialisation in case that flexibility is not required.