| Module | WidgetWrapper::Menus::MenuBar |
| In: |
widget_wrapper/lib/wx_wrapper/menu.rb
|
Menu bar syntax (This code follows after a frame block):
menu_bar.menu "&File" do |item|
item.add :new
item.add :open
item.separator
item.add :save
item.separator
item.add :quit
end
menu_bar.menu "&Edit" do |item|
item.add :undo
item.add :redo
end
The & in the menu title (ie &File) is used underlined and used as a shortcut for referencing alt command navigation for windows. You can move the ampersand in front of a different letter if you would like another letter to be the shortcut for alt keys. (As of yet, I don‘t know how this works in OS X if it has any effect at all).