org.gnu.gtk
Class OptionMenu
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.
OptionMenu() - Create a new OptionMenu.
|
OptionMenu(Handle handle) - Construct an OptionMenu using a handle to a native resource.
|
addListener , click , enter , getButton , getEventListenerClass , getEventType , getFocusOnClick , getImage , getLabel , getRelief , getType , getUseStock , getUseUnderline , getXAlignment , getYAlignment , leave , press , release , removeListener , setAlignment , setFocusOnClick , setImage , setLabel , setRelief , setUseStock , setUseUnderline |
add , addListener , getBooleanChildProperty , getBorderWidth , getChildProperty , getChildren , getEventListenerClass , getEventType , getIntChildProperty , getResizeMode , getType , remove , removeListener , resizeChildren , setBooleanChildProperty , setBorderWidth , setChildProperty , setIntChildProperty , setResizeMode |
activate , addAccelerator , addEvents , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , canActivateAccel , createContext , createLayout , draw , drawArea , drawArea , finish , getAccessible , getAllocation , getCanFocus , getColormap , getContext , getData , getDisplay , getDragData , getEventListenerClass , getEventType , getExtensionEvents , getModifierStyle , getName , getParent , getParentWindow , getPointer , getRootWindow , getScreen , getSensitive , getStyle , getToplevel , getType , getWidget , getWindow , grabDefault , grabFocus , hasFocus , hasScreen , hide , hideAll , highlight , highlight , intersect , isAncestor , makeWidget , modifyStyle , popColormap , pushColormap , realize , removeAccelerator , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , reparent , setBackgroundColor , setBaseColor , setCanFocus , setColormap , setDoubleBuffered , setDragDestination , setDragIcon , setDragIconPixbuf , setDragIconStock , setDragSource , setEvents , setExtensionEvents , setFont , setForegroundColor , setMinimumSize , setName , setNoDragDestination , setNoDragSource , setSensitive , setTextColor , shapeCombineMask , show , showAll , unHighlight , unHighlight |
OptionMenu
public OptionMenu()
Create a new OptionMenu.
OptionMenu
public OptionMenu(Handle handle)
Construct an OptionMenu using a handle to a native resource.
addListener
public void addListener(OptionMenuListener listener)
Register an object to handle optionMenu events.
getHistory
public int getHistory()
Retrieves the index of the currently selected menu item. The menu items
are numbered from top to bottom, starting with 0.
- index of the selected menu item, or -1 if there are no menu items
getMenu
public Menu getMenu()
Returns the Menu associated with this OptionMenu.
- The Menu associated with this OptionMenu.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Button
removeMenu
public void removeMenu()
Removes the Menu from the OptionMenu
setHistory
public void setHistory(int index)
Selects the menu item specified by index
making it the
newly selected value for the option menu.
index
- the index of the menu item to select. Index values are from 0
to n-1.
setMenu
public void setMenu(Menu menu)
Provides the Menu that is popped up to allow the user to choose a new
value. You should provide a simple menu avoiding the use of tearoff menu
items, submenus, and accelerators.
menu
- The Menu to add to the OptionMenu.