{column:padding=0px|width=80px}{column}{column}{column}
Property Summery
Object[]
methodArguments
Set the arguments that can be read by the defined method.
{column:padding=0px|width=80px}{column}{column}{column}
Method Summery
void
doClick()
Script the selection (emulate a mouse click) of the item.
setAccelerator(key)
Set the accelerator key of the item.
setMnemonic(key)
Set the mnemonic key of the item.
setVisible(visible)
Set the item visible.
{column:padding=0px|width=100%}{column}
Property Details
Replace with description
Returns
Boolean
Set the arguments that can be read by the defined method.
Returns
Object[]
Sample
var menu = plugins.window.getMenu(2).getItem(0); // Set the text of the item. menu.setText("Servoy"); // Set the method for the item. menu.setMethod(callback); // 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.methodArguments = ["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);
Replace with description
Returns
String
Replace with description
Returns
Boolean
Replace with description
Returns
String
{column:padding=0px|width=100%}{column}
Method Details
void
doClick
()
Script the selection (emulate a mouse click) of the item.
Returns
void
Sample
// Script the selection (emulate a mouse click) of the item. // Clicking a separator will throw an error! plugins.window.getMenu(2).getItem(0).doClick();
setAccelerator
(key)
Set the accelerator key of the item.
Parameters
key
Returns
CheckBox
Sample
var menu = plugins.window.getMenu(2).getItem(0); // Set the text of the item. menu.setText("Servoy"); // Set the method for the item. menu.setMethod(callback); // 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.methodArguments = ["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);
setAlign
()
Replace with description
Returns
CheckBox
setIcon
(icon)
Set the icon of the item.
Parameters
icon
Returns
CheckBox
Sample
var menu = plugins.window.getMenu(2).getItem(0); // Set the text of the item. menu.setText("Servoy"); // Set the method for the item. menu.setMethod(callback); // 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.methodArguments = ["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);
setMethod
(method)
Set the method for the item.
Parameters
method
Returns
CheckBox
Sample
var menu = plugins.window.getMenu(2).getItem(0); // Set the text of the item. menu.setText("Servoy"); // Set the method for the item. menu.setMethod(callback); // 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.methodArguments = ["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);
setMnemonic
(key)
Set the mnemonic key of the item.
Parameters
key
Returns
CheckBox
Sample
var menu = plugins.window.getMenu(2).getItem(0); // Set the text of the item. menu.setText("Servoy"); // Set the method for the item. menu.setMethod(callback); // 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.methodArguments = ["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);
setVisible
(visible)
Set the item visible.
Parameters
visible
Returns
CheckBox
Sample
var menu = plugins.window.getMenu(2).getItem(0); // Set the text of the item. menu.setText("Servoy"); // Set the method for the item. menu.setMethod(callback); // 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.methodArguments = ["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);