The NativeMenubar API lets you customize the Windows Mobile/CE native menu buttons.
This API is part of the coreapi
extension that is included automatically.
extensions: ["coreapi"]
Be sure to review the JavaScript API Usage guide for important information about using this API in JavaScript.
Be sure to review the Ruby API Usage guide for important information about using this API in Ruby.
This will return what the default right menu should be. This is a read-only property.
Property Access:
Rho::NativeMenubar.defaultMainMenu
Defined behavior of the Left menu button for Windows Mobile applications. This takes the same HASH as a menu item {label: ‘Left Button’, action: ‘alert(“You pressed the left button”)’}. If your menu is using menu items via mainMenu, then be sure to not set an action for the extraButton. Setting an action for the extraButton will cause the mainMenu setting to be ignored.
Property Access:
Rho.NativeMenubar.extraButton
Rho::NativeMenubar.extraButton
The Left menu items for Windows Mobile applications. This defines the list of menu choices when the extraButton is pressed.
Same values as for mainMenu.
Property Access:
Rho.NativeMenubar.extraMenu
Rho::NativeMenubar.extraMenu
Defined behavior of the Right menu button for Windows Mobile applications. This takes the same HASH as a menu item {label: ‘Right Button’, action: ‘javascript: alert(“You pressed the right button”);’}. If your menu is using menu items via mainMenu, then be sure to not set an action for the mainButton. Setting an action for the mainButton will cause the mainMenu setting to be ignored.
Property Access:
Rho.NativeMenubar.mainButton
Rho::NativeMenubar.mainButton
The Right menu items in Windows Mobile applications. This defines the list of menu choices when the mainButton is pressed.
Visible label.
URL to page which will be loaded into tab. It may be path to Ruby controller action; i.e. ‘/app/Account’ would load the Account index action. For ruby callback use ‘callback:/app/Account’ Or JavaScript method to call: ‘javascript: methodOnTab();’. Or path to html page to load.
Menu item will be displayed as disabled.
Platforms:WMProperty Access:
Rho.NativeMenubar.mainMenu
Rho::NativeMenubar.mainMenu
Rho.NativeMenubar.extraButton = { label: "Extra" }; Rho.NativeMenubar.extraMenu = [ { label: "Show alert 1", action: javascript:show_alert_1();, }, { label: "Show alert 2", action: javascript:show_alert_2();, }, { label: "Win the lottery", disabled: true } ];
Rho::NativeMenubar.extraButton = { :label => "Extra" } Rho::NativeMenubar.extraMenu = [ { :label => "Show alert 1", :action => url_for(:action => :show_alert_1) }, { :label => "Show alert 2", :action => url_for(:action => :show_alert_2) }, { :label => "Win the lottery", :disabled => true } ]
function remove_menuitems() { Rho.NativeMenubar.mainMenu = []; }
def remove_menuitems Rho::NativeMenubar.mainMenu = [] end