org.gnu.gtk
public class OptionMenu extends Button
Deprecated: Replaced by ComboBox in gtk 2.3
deprecated menu widget replaced by ComboBox in gtk 2.3. An OptionMenu is a widget that allows the user to choose from a list of valid choices. When activated the OptionMenu displays a popup Menu which allows the user to make a new choice.| Constructor Summary | |
|---|---|
| OptionMenu()
Create a new OptionMenu. | |
| OptionMenu(Handle handle)
Construct an OptionMenu using a handle to a native resource. | |
| Method Summary | |
|---|---|
| void | addListener(OptionMenuListener listener)
Register an object to handle optionMenu events.
|
| Class | getEventListenerClass(String signal) |
| EventType | getEventType(String signal) |
| int | getHistory()
Retrieves the index of the currently selected menu item. |
| Menu | getMenu()
Returns the Menu associated with this OptionMenu.
|
| static Type | getType()
Retrieve the runtime type used by the GLib library. |
| void | removeListener(OptionMenuListener listener)
Removes a listener
|
| void | removeMenu()
Removes the Menu from the OptionMenu |
| void | setHistory(int index)
Selects the menu item specified by index making it the
newly selected value for the option menu.
|
| void | setMenu(Menu menu)
Provides the Menu that is popped up to allow the user to choose a new
value. |
See Also: OptionMenuListener
Returns: index of the selected menu item, or -1 if there are no menu items
Returns: The Menu associated with this OptionMenu.
See Also: addListener
index making it the
newly selected value for the option menu.
Parameters: index the index of the menu item to select. Index values are from 0 to n-1.
Parameters: menu The Menu to add to the OptionMenu.