II. GUI Basics
Chapter 6. Widgets - Using Widgets to Create Interfaces
Combobox
Combobox Widget. Combobox consists of Listbox, and Item widgets
XML Element Name
- <Combobox>
- <Listbox>
- <Item/>
- <Item/>
- <Item/>
- </Listbox>
- </Combobox>
Example
- <Widget setSize="200,100">
- <Combobox setShape="5,5,120,25" setLabel="Select Item">
- <Listbox setSize="100,60">
- <Item setLabel="Item 1"/>
- <Item setLabel="Item 2"/>
- <Item setLabel="Item 3"/>
- </Listbox>
- </Combobox>
- </Widget>
Combobox appears with the label set to 'Select item':

The listbox inside the Combobox displays three Items, and the user clicks on the 'Item 3:

'Item 3' selected in the Combobox:
Combobox properties
Basic set of methods that applies to all widgets and is applicable to Combobox/Listbox/Item is described in the Chapter 9 for widgets styles, and Chapter 10
for widgets attributes. For event handling methods please refer to Chapter 12.
Back
Next