Child pages
  • MenuItem
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Unknown macro: {sub-section}


Unknown macro: {table}

{column:width=80px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

text


Unknown macro: {table}

{column:width=80px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

doClick()
Script the selection (emulate a mouse click) of the item.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

set(text, method, arguments, icon, key, mnemonic, enabled, visible)
Define the item with a text and a global method.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setAccelerator(key)
Set the accelerator key of the item.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setArguments(arguments)
Set the arguments that can be read by the defined method.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setEnabled(enabled)
Enable/disable the item.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setIcon(icon)
Set the icon of the item.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setMnemonic(key)
Set the mnemonic key of the item.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setVisible(visible)
Set the item visible.


Unknown macro: {table}

{column:width=100%}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
text
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Replace with description

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

String

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}


Unknown macro: {table}

{column:width=100%}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
doClick
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

doClick

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Script the selection (emulate a mouse click) of the item...

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
// Script the selection (emulate a mouse click) of the item...
// Clicking a separator will throw an error!
plugins.menubar.getMenu(2).getItem(0).doClick();
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
set
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

set

Unknown macro: {span}

(text, method, arguments, icon, key, mnemonic, enabled, visible)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Define the item with a text and a global method. Arguments, icon, accelerator, mnemonic key, visibility and enabling are optional...

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

text
method
[arguments]
[icon]
[key]
[mnemonic]
[enabled]
[visible]

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
// Define the item with a text and a global method. Arguments, icon, accelerator, mnemonic key, visibility and enabling are optional...
// get the menu at the last index
// indexes start at 0 (zero) so index 2 is in fact position 3
var menu = plugins.menubar.getMenu(plugins.menubar.getMenuCount() - 1);

// when you don't define an index the item will be added at the last position
// this is what you usually do to build a new menu
var item = menu.addItem();

// create the settings for the specified menu item
// minimum settings are the text and method properties
// the method can be a global or form method
// be sure to enter the method WITHOUT '()' at the end
item.set("item with feedback",globals.feedback_item);

var item = menu.addItem();

// add an 'input' array. the array will be concatenated to the end of the arguments
// array which can be read out in the selected method
var input = [1,"is","the","added","input",false];

item.set("item with input",globals.feedback_item,input);

var item = menu.addItem();
// add an icon to the item
item.set("item with icon",globals.feedback_item,input,"media:///yourimage.gif");

var item = menu.addItem();
// add an accelerator key ('alt shift 2' in the below example)
// REMARK: always test the accelerator key. sometimes they will not work because
// these keys already have an 'action' assigned to them via the operating system.
item.set("item with accelerator",globals.feedback_item,input,"media:///yourimage.gif","alt shift 2");

var item = menu.addItem();
// add a mnemonic key  ('i' in our example) which is the underlined shortkey on windows
// REMARK: setting the mnemonic key is platform dependent
// the accelerator key will not work in this and the next example
item.set("item with mnemonic",globals.feedback_item,input,"media:///yourimage.gif","pressed COMMA","i");

var item = menu.addItem();
// disable the menu item
item.set("item disabled",globals.feedback_item,input,"media:///yourimage.gif","meta HOME","t",false);

var item = menu.addItem();
// set the menu item to be visible
// this accelerator key will work
item.set("item visible",globals.feedback_item,input,"media:///yourimage.gif","shift meta PAGE_DOWN","e",true,true);

var item = menu.addItem();
// now the item is enabled and NOT visible
item.set("item invisible",globals.feedback_item,input,"media:///yourimage.gif","A","m",true,false);

// add a separator at the last position or at a given index
menu.addSeparator();
return;
// when you don't define an index the checkbox will be added at the last position
// this is what you usually do to build a new menu
var checkbox = menu.addCheckBox();

// create the settings for the specified menu item
// minimum settings are the text and method properties
// the method can be a global or form method
// be sure to enter the method WITHOUT '()' at the end
checkbox.set("item 09",feedback_checkbox);
// ,false,input,"media:///yourimage.gif");

var checkbox = menu.addCheckBox();
checkbox.set("item 10",feedback_checkbox,true,null,"media:///yourimage.gif");

// add a separator at the last position or at a given index
menu.addSeparator();

// add a new Radiobutton Group
// the Radiobutton Group 'binds' the added radiobuttons to each other
menu.addRadioGroup();

var radiobutton = menu.addRadioButton();
radiobutton.set("item 12",feedback_radiobutton,false,input,"media:///yourimage.gif");

var radiobutton = menu.addRadioButton();
radiobutton.set("item 13",feedback_radiobutton,true,null,"media:///yourimage.gif");

// add a new Radiobutton Group
menu.addRadioGroup();

var radiobutton = menu.addRadioButton();
radiobutton.set("item 14",feedback_radiobutton,false,null,null,"F6","i");

var radiobutton = menu.addRadioButton();
radiobutton.set("item 15",feedback_radiobutton,false,null,null,"meta F7","t");

// add a separator at the last position or at a given index
menu.addSeparator();

// and add some submenu's
var submenu1 = menu.addSubMenu();
submenu1.set("submenu 17");
submenu1.addItem().set("sub item 17-00",globals.sampleMenuExec);

var submenu2 = submenu1.addSubMenu();
submenu2.set("submenu 01");
submenu2.addItem().set("sub item 01-00",globals.sampleMenuExec);

var submenu3 = submenu1.addSubMenu();
submenu3.set("submenu 02");

// add a separator at the last position or at a given index
menu.addSeparator();

// WIZARD
// You can use the menubar wizard solution found in application_server/solutions/servoy_wizard_menubar.servoy to create your menu
// The wizard will help you at least to learn how to use the plugin and will help you to find the correct
// accelerator key string
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setAccelerator
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setAccelerator

Unknown macro: {span}

(key)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Set the accelerator key of the item...

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

key

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var menu = plugins.menubar.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setArguments
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setArguments

Unknown macro: {span}

(arguments)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Set the arguments that can be read by the defined method...

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

arguments

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var menu = plugins.menubar.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setEnabled
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setEnabled

Unknown macro: {span}

(enabled)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Enable/disable the item...

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

enabled

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var menu = plugins.menubar.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setIcon
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setIcon

Unknown macro: {span}

(icon)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Set the icon of the item...

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

icon

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var menu = plugins.menubar.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setMnemonic
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setMnemonic

Unknown macro: {span}

(key)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Set the mnemonic key of the item...

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

key

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var menu = plugins.menubar.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setVisible
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setVisible

Unknown macro: {span}

(visible)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Set the item visible...

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

visible

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var menu = plugins.menubar.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
Unknown macro: {tr}
Unknown macro: {td}
  • No labels