Gtk2_IndexedComboBox (Previous) (Next) Conquering Glade combo boxes

View this page in Last updated: Mon, 02 Jul 2007
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Simple example

Simple example -- To get started easily

Simple example

In this example, we will create a combo box, add an array of key/value pairs and display the currently selected pair in a label.

At first, we create a new combo widget object. You already could pass the array of data in the constructor if you wanted to, but here we use the set_array() method to do this. After providing the data, entry with id 2 is made active/pre-selected.

Whenever the selection changes, the example displays the selected key and value in a label below the combo box. We use get_active_key() to retrieve the key, and get_active_text() to retrieve the value.

Gtk2_IndexedComboBox (Previous) (Next) Conquering Glade combo boxes

Download Documentation Last updated: Mon, 02 Jul 2007
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.