F O R · R E A L L Y · T H I N · C L I E N T S
 Home  |  Overview  |  Widgets  |  Demo  |  License  |  History 

» Component
» Label
» Button
» CheckBox
» ComboBox
» TextField
» PasswordField
» TextArea
» TabbedPane
» Panel
» Desktop
» Dialog
» SpinBox
» ProgressBar
» Slider
» SplitPane
» List
» Table
» Tree
» Separator
» MenuBar

MenuBar
The following panel contains a menubar on the top and a large text-area. The menubar has only one menu ('Menu'), it has a menuitem ('MenuItem') and a menu ('Menu'). The later's popup contains a menuitem with a selected checkbox ('CheckBox'), a separator, and a radio button ('RadioButton').
<panel columns="1" gap="4">
  <menubar weightx="1">
    <menu text="Menu">
      <menuitem text="MenuItem" icon="image.gif" />
      <menu text="Menu">
        <checkboxmenuitem text="CheckBox" selected="true" />
        <separator />
        <checkboxmenuitem text="RadioButton" group="group"/>
      </menu>
    </menu>
  </menubar>
  <textarea weighty="1" />
</panel>

Parameters
NameTypeDefaultDescription
name, enabled, visible, tooltip, width, height, colspan, rowspan, weightx, weighty, halign, and valign parameters are similar to component


Menu
Menubar includes menu, and menu could contain menuitems, check or radio button items, separators, and menus.

Parameters
NameTypeDefaultDescription
mnemonicinteger-1 Specifies the index of the underlined char and the key combination which selects the menu.
name, enabled, text, icon, and alignment parameters are similar to combobox choice


MenuItem
A regular menu item can have either text or a graphic icon associated with it, or both.

Parameters
NameTypeDefaultDescription
acceleratorstringnull The key combination which invokes the menuitem's action method without navigating the menu hierarchy.
actionmethodnull Invokes the given method when the menuitem is pressed by mouse or keyboard.
mnemonicinteger-1 Specifies the underlined char index (thus the key combination) which invokes the action listener.
name, enabled, text, icon, and alignment parameters are similar to combobox choice


CheckBoxMenuItem
A menu item that can be selected or deselected. The selecte menuitem appears with a checkmark next to it. A radio-button menu-item is a menu item that is part of a group of menu items in which only one item in the group can be selected.

Parameters
NameTypeDefaultDescription
selectedbooleanfalse The state of the checkboxmenuitem.
groupstringnull Identifies a group if not null. Only one radio menuitem at a time can be selected in a group. User can set on a radio menuitem, the selected menuitem of the group will be set off (the group members is searched only in the same menu).
name, enabled, text, icon, and alignment parameters are similar to combobox choice
mnemonic, accelerator, and action parameters are described at menuitem

Keyboard-actions
OperationAction
F10Moves focus to menu bar and posts first menu
Up arrowSelects previous item (or the last)
Down arrowSelects next item (or the first)
Left arrowCollapses last popupmenu, or selects previous (or the last) menu of menubar
Right arrowExpands menu, or selects next (or the first) menu of menubar
Enter, Return, SpacebarActivates a menu item, dismisses menu, and goes to last window item with focus
EscapeDismisses menu without taking action and returns focus to last component that had focus

Copyright © 2002 Robert Bajzat - info@thinlet.com - All rights reserved.