Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Script the selection (emulate a mouse click) of the item. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// simulate a click on the entry
entry.doClick(); |
|
|
|
|
Table Body (tbody) |
---|
id | getClientProperty-Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getClientProperty |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the specified client property for the menu item/checkbox/radiobutton based on a key. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// NOTE: Depending on the operating system, a user interface property name may be available.
// set the tooltip of the menu item/checkbox/radiobutton via client properties
// keep the original tooltip in a form or global variable
originalTooltip = entry.getClientProperty("ToolTipText");
entry.putClientProperty("ToolTipText", "changed tooltip");
// later restore the original tooltip from the variable
//var menubar = plugins.window.getMenuBar();
//var menuIndex = menubar.getMenuIndexByText("New Menu");
//var menu = menubar.getMenu(menuIndex);
//var entry = menu.getItem(0);
//entry.putClientProperty("ToolTipText", originalTooltip); |
|
|
|
|
Table Body (tbody) |
---|
id | putClientProperty-Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
putClientProperty |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sets the value for the specified client property key of the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// NOTE: Depending on the operating system, a user interface property name may be available.
// set the tooltip of the menu item/checkbox/radiobutton via client properties
// keep the original tooltip in a form or global variable
originalTooltip = entry.getClientProperty("ToolTipText");
entry.putClientProperty("ToolTipText", "changed tooltip");
// later restore the original tooltip from the variable
//var menubar = plugins.window.getMenuBar();
//var menuIndex = menubar.getMenuIndexByText("New Menu");
//var menu = menubar.getMenu(menuIndex);
//var entry = menu.getItem(0);
//entry.putClientProperty("ToolTipText", originalTooltip); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setAccelerator |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the accelerator key of the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sets the alignment of the checkbox. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a checkbox
var entry = menu.addCheckBox("menu entry", feedback);
// alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// enable alignment of the new entry
entry.setAlign(true); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setBackgroundColor |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the background color of the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setForegroundColor |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the foreground color of the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the icon of the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the method for the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);
// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method |
|
|
|
|
menu.methodArguments = ["a","b"];Settheiconoftheitem.
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);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B5C1829A-D375-4935-8E3A-21CEE94EEBC8}{tr:id=name}{td}h6.setMnemonic{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}setMnemonic{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=des}{td}{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_des|text=|trigger=button}{sub-section}{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_des|trigger=none|class=sIndent}Set the mnemonic key of the item.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_prs|trigger=none}key
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_ret|text=|trigger=button}{sub-section}{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_see|text=|trigger=button}{sub-section}{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_see|text=|trigger=button}{sub-section}{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_sam|text=|trigger=button}{sub-section}{sub-section:B5C1829A-D375-4935-8E3A-21CEE94EEBC8_sam|class=sIndent|trigger=none}{code:language=javascript}
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);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C4558893-BED0-4E34-B743-4D6DE21EEB20}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}setVisible{span}{span:id=iets|style=float: left;}\(visible){span}{td}{tr}{tr:id=des}{td}{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_des|text=|trigger=button}{sub-section}{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_des|trigger=none|class=sIndent}Set the item visible.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_prs|trigger=none}visible
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_ret|text=|trigger=button}{sub-section}{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_see|text=|trigger=button}{sub-section}{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_see|text=|trigger=button}{sub-section}{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_sam|text=|trigger=button}{sub-section}{sub-section:C4558893-BED0-4E34-B743-4D6DE21EEB20_sam|class=sIndent|trigger=none}{code:language=javascript}
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);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}fixed:
// [0] item index
// [1] parent item index
// [2] isSelected boolean
// [3] parent menu text
// [4] menu text
entry.methodArguments = [17, "data"]; |
|
|
|
|
Table Body (tbody) |
---|
id | setMethod-Function_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the method for the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);
// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed:
// [0] item index
// [1] parent item index
// [2] isSelected boolean
// [3] parent menu text
// [4] menu text
entry.methodArguments = [17, "data"]; |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setMnemonic |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Set the mnemonic key of the menu item/checkbox/radiobutton. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);
// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setVisible |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();
// add a menu item
var entry_one = menu.addMenuItem("an entry", feedback);
// add a checkbox
var entry_two = menu.addCheckBox("another entry", feedback);
// add a radiobutton
var entry_three = menu.addRadioButton("yet another entry", feedback);
// hide the menu item
entry_one.setVisible(false);
// make sure the checkbox is visible
entry_two.setVisible(true);
// hide the radiobutton
entry_three.setVisible(false); |
|
|
|
|
|