Child pages
  • CheckBox

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[StringBoolean]{td}{td}[#text#enabled]
{td}{tr}{tbody}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}voidObject[]{td}{td}[#doClick#methodArguments]\()
ScriptSet the selectionarguments (emulatethat acan mousebe click)read ofby the itemdefined method.{td}{tr}{tbody}{tbody}{tr}{td}void[String]{td}{td}[#set]\(text, method, selected, arguments, icon, key, mnemonic, enabled, visible)
Define the item with a text and a global method.#name]
{td}{tr}{tbody}{tbody}{tr}{td}void[Boolean]{td}{td}[#setAccelerator]\(key)
Set the accelerator key of the item.#selected]
{td}{tr}{tbody}{tbody}{tr}{td}void[String]{td}{td}[#setAlign#text]\()
{td}{tr}{tbody}{tbodytable}{tr\\ 

{table:class=servoy sSummery}{tdcolgroup}void{td}{td}[#setArguments]\(arguments)
Set the arguments that can be read by the defined methodcolumn:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}void{td}{td}[#doClick]\()
Script the selection (emulate a mouse click) of the item.{td}{tr}{tbody}{tbody}{tr}{td}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{td}{td}[#setEnabled#setAccelerator]\(enabledkey)
Enable/disable
Set the accelerator key of the item.{td}{tr}{tbody}{tbody}{tr}{td}void[CheckBox]{td}{td}[#setAlign]\()
{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setIcon]\(icon)
Set the icon of the item.{td}{tr}{tbody}{tbody}{tr}{td}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{td}{td}[#setMnemonic#setMethod]\(keymethod)
Set the mnemonicmethod keyfor of the item.{td}{tr}{tbody}{tbody}{tr}{td}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{td}{td}[#setSelected#setMnemonic]\(selectedkey)
Set the mnemonic item selectedkey of the item.{td}{tr}{tbody}{tbody}{tr}{td}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{td}{td}[#setVisible]\(visible)
Set the item visible.{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB}{tr:id=name}{td}h6.textenabled{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_des|text=|trigger=button}{sub-section}{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_ret|text=|trigger=button}{sub-section}{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_ret|trigger=none|class=sIndent}[StringBoolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_see|text=|trigger=button}{sub-section}{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_see|text=|trigger=button}{sub-section}{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_sam|text=|trigger=button}{sub-section}{sub-section:06514922061D06F3-16E1BD27-49A14CFE-8CA7801A-4F349D7940E52FB5AB8D0EEB_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F}{tr:id=name}{td}h6.doClickmethodArguments{td}{tr}{tr:id=sigdes}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}doClick{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:F01E634B-1800-4B3B-B6F5-763E0C7C8507sub-section:CC771CFF-0E7E-4F58-88F9-E4A535BFD42F_des|text=|trigger=button}{sub-section}{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_des|trigger=none|class=sIndent}ScriptSet the selectionarguments (emulatethat acan mousebe click)read ofby the item..defined method.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_ret|text=|trigger=button}{sub-section}{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_ret|trigger=none|class=sIndent}voidObject[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_see|text=|trigger=button}{sub-section}{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_see|text=|trigger=button}{sub-section}{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_sam|text=|trigger=button}{sub-section}{sub-section:F01E634BCC771CFF-18000E7E-4B3B4F58-B6F588F9-763E0C7C8507E4A535BFD42F_sam|class=sIndent|trigger=none}{code:language=javascript}
//var Scriptmenu the selection (emulate a mouse click)= plugins.window.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("Servoy");
// ClickingSet athe separatormethod willfor throwthe an error!
plugins.menubar.getMenu(2).getItem(0).doClick();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DF652F17-D16F-42ED-AD48-4644D6672C03}{tr:id=name}{td}h6.set{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}set{span}{span:id=iets|style=float: left;}\(text, method, selected, arguments, icon, key, mnemonic, enabled, visible){span}{td}{tr}{tr:id=des}{td}{sub-section:DF652F17-D16F-42ED-AD48-4644D6672C03_des|text=|trigger=button}{sub-section}{sub-section:DF652F17-D16F-42ED-AD48-4644D6672C03_des|trigger=none|class=sIndent}Define the item with a text and a global method. Arguments, icon, accelerator, mnemonic key, visibility and enabling are optional...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:idclass=prslastDetailRow}{td}*Parameters*\\{sub-section:DF652F17-D16F-42ED-AD48-4644D6672C03_prs{td}{tr}{tbody}{tbody:id=EFE89238-DDB4-4340-A21B-A0BB182EEF57}{tr:id=name}{td}h6.name{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:EFE89238-DDB4-4340-A21B-A0BB182EEF57_des|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_prsdes|trigger=none|class=sIndent}textReplace method
\[selected\]
\[arguments\]
\[icon\]
\[key\]
\[mnemonic\]
\[enabled\]
\[visible\]
{sub-section}{div}{td}{trwith description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_retprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_retprs|trigger=none|class=sIndent}void{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_seeret|text=|trigger=button}{sub-section}{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03_seeA0BB182EEF57_ret|trigger=none|class=sIndent|trigger=none}}[String]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_see|text=|trigger=button}{sub-section}{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_linksee|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_samsee|text=|trigger=button}{sub-section}{sub-section:DF652F17EFE89238-D16FDDB4-42ED4340-AD48A21B-4644D6672C03A0BB182EEF57_samlink|class=sIndent|trigger=none}{code:language=javascript}
// 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 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("checkbox with feedback",feedback_checkbox);

var checkbox = menu.addCheckBox();
// set the checkbox to selected
checkbox.set("checkbox selected",feedback_checkbox, true);

var checkbox = menu.addCheckBox();

// 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];

checkbox.set("checkbox with input",feedback_checkbox,false,input);

var checkbox = menu.addCheckBox();
// add an icon to the item
checkbox.set("checkbox with icon",feedback_checkbox,false,input,"media:///yourimage.gif");

var checkbox = menu.addCheckBox();
// add an accelerator key ('alt shift a' 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.
checkbox.set("checkbox with accelerator",feedback_checkbox,false,input,"media:///yourimage.gif","alt shift a");

var checkbox = menu.addCheckBox();
// add a mnemonic key  ('i' in our example) which is the underlined shortkey on windows
// REMARK: setting the mnemonic key is platform dependent
checkbox.set("checkbox with mnemonic",feedback_checkbox,false,input,"media:///yourimage.gif","a","i");

var checkbox = menu.addCheckBox();
// disable the menu item
checkbox.set("checkbox disabled",feedback_checkbox,false,input,"media:///yourimage.gif","control 3","t",false);

var checkbox = menu.addCheckBox();
// set the menu item to be visible
checkbox.set("checkbox visible",feedback_checkbox,false,input,"media:///yourimage.gif","meta 4","e",true,true);

var checkbox = menu.addCheckBox();
// set the menu item disabled and NOT visible
checkbox.set("checkbox invisible",feedback_checkbox,false,input,"media:///yourimage.gif","alt 5","m",false,false);

// 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
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5440B3D8-9442-4951-9987-00479914AA3B}{tr:id=name}{td}h6.setAccelerator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setAccelerator{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=des}{td}{sub-section:5440B3D8-9442-4951-9987-00479914AA3B_dessub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:EFE89238-DDB4-4340-A21B-A0BB182EEF57_sam|text=|trigger=button}{sub-section}{sub-section:EFE89238-DDB4-4340-A21B-A0BB182EEF57_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8B853DD4-C167-4F5E-964C-6DD55CD47C1E}{tr:id=name}{td}h6.selected{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_des|text=|trigger=button}{sub-section}{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_ret|text=|trigger=button}{sub-section}{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_see|text=|trigger=button}{sub-section}{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_see|text=|trigger=button}{sub-section}{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_sam|text=|trigger=button}{sub-section}{sub-section:8B853DD4-C167-4F5E-964C-6DD55CD47C1E_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=10C5E6EB-E45D-4A42-957D-CA58ECF8C767}{tr:id=name}{td}h6.text{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_des|text=|trigger=button}{sub-section}{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_ret|text=|trigger=button}{sub-section}{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_see|text=|trigger=button}{sub-section}{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:10C5E6EB-E45D-4A42-957D-CA58ECF8C767_see|text=|trigger=button}{sub-section}{sub-section:5440B3D810C5E6EB-9442E45D-49514A42-9987957D-00479914AA3B_desCA58ECF8C767_link|class=sIndent|trigger=none|class=sIndent}Set the accelerator key of the item...{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:5440B3D810C5E6EB-9442E45D-49514A42-9987957D-00479914AA3BCA58ECF8C767_prssam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5440B3D810C5E6EB-9442E45D-49514A42-9987957D-00479914AA3B_prsCA58ECF8C767_sam|class=sIndent|trigger=none}key
{sub-section}{divtd}{tdtr}{trbuilder-show}{tr:idclass=retlastDetailRow}{td}*Returns*\\{sub-section:5440B3D8-9442-4951-9987-00479914AA3B_ret|text=|trigger=button}{sub-section}{sub-section:5440B3D8-9442-4951-9987-00479914AA3B_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5440B3D8-9442-4951-9987-00479914AA3B_see|text=|trigger=button}{sub-section}{sub-section:5440B3D8-9442-4951-9987-00479914AA3B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=4E618209-6D81-4999-92B9-39A488B6EBDB}{tr:id=name}{td}h6.doClick{td}{tr}{tr:id=linksig}{td}*External links*\\{sub-section:5440B3D8-9442-4951-9987-00479914AA3B_see|text=|trigger=button}{sub-section}{sub-section:5440B3D8-9442-4951-9987-00479914AA3B_link|class=sIndent|trigger=none}{sub-section{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}doClick{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show}{tr:id=samdes}{td}*Sample*\\{sub-section:5440B3D84E618209-94426D81-49514999-998792B9-00479914AA3B39A488B6EBDB_samdes|text=|trigger=button}{sub-section}{sub-section:5440B3D84E618209-94426D81-49514999-998792B9-00479914AA3B39A488B6EBDB_samdes|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubar.getMenu(2).getCheckBox(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the item selected...
menu.setSelected(true);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 4, 5 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///yourimage.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|class=sIndent}Script the selection (emulate a mouse click) of the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4E618209-6D81-4999-92B9-39A488B6EBDB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4E618209-6D81-4999-92B9-39A488B6EBDB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=32CC7C00-6DA6-49E6-934E-1308847A28E8}{tr:id=name}{td}h6.setAlign{td}{tr*Returns*\\{sub-section:4E618209-6D81-4999-92B9-39A488B6EBDB_ret|text=|trigger=button}{sub-section}{sub-section:4E618209-6D81-4999-92B9-39A488B6EBDB_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=sigsee}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setAlign{span}{span:id=iets|style=float: left;}\(){span*Also see*\\{sub-section:4E618209-6D81-4999-92B9-39A488B6EBDB_see|text=|trigger=button}{sub-section}{sub-section:4E618209-6D81-4999-92B9-39A488B6EBDB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=deslink}{td}*External links*\\{sub-section:32CC7C004E618209-6DA66D81-49E64999-934E92B9-1308847A28E839A488B6EBDB_dessee|text=|trigger=button}{sub-section}{sub-section:32CC7C004E618209-6DA66D81-49E64999-934E92B9-1308847A28E8_des39A488B6EBDB_link|class=sIndent|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:32CC7C004E618209-6DA66D81-49E64999-934E92B9-1308847A28E839A488B6EBDB_prssam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:32CC7C004E618209-6DA66D81-49E64999-934E92B9-1308847A28E8_prs39A488B6EBDB_sam|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:32CC7C00-6DA6-49E6-934E-1308847A28E8_ret|text=|trigger=button}{sub-section}{sub-section:32CC7C00-6DA6-49E6-934E-1308847A28E8_ret|trigger=none|class=sIndent}void{sub-section}code:language=javascript}
// Script the selection (emulate a mouse click) of the item.
// Clicking a separator will throw an error!
plugins.window.getMenu(2).getItem(0).doClick();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F9193DAB-507E-4226-A2C9-580CE0E5E4F5}{tr:id=name}{td}h6.setAccelerator{td}{tr}{builder-show:permission=edit}{tr:id=seesig}{td}*Also see*\\{sub-section:32CC7C00-6DA6-49E6-934E-1308847A28E8_see|text=|trigger=button}{sub-section}{sub-section:32CC7C00-6DA6-49E6-934E-1308847A28E8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit{span:style=float: left; margin-right: 5px;}com.servoy.extensions.plugins.window.menu.AbstractMenuItem{span}{span:id=iets|style=float: left; font-weight: bold;}setAccelerator{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=linkdes}{td}*External links*\\{sub-section:32CC7C00F9193DAB-6DA6507E-49E64226-934EA2C9-1308847A28E8580CE0E5E4F5_seedes|text=|trigger=button}{sub-section}{sub-section:32CC7C00F9193DAB-6DA6507E-49E64226-934EA2C9-1308847A28E8_link580CE0E5E4F5_des|trigger=none|class=sIndent|trigger=none}}Set the accelerator key of the item.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samprs}{td}*SampleParameters*\\{sub-section:32CC7C00F9193DAB-6DA6507E-49E64226-934EA2C9-1308847A28E8580CE0E5E4F5_samprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:32CC7C00F9193DAB-6DA6507E-49E64226-934EA2C9-1308847A28E8_sam|class=sIndent580CE0E5E4F5_prs|trigger=none}key
{sub-section}{div}{td}{tr}{builder-show}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=1FB26DE7-A11A-4071-9377-EA4894E7C4FF}{tr:id=name}{td}h6.setArguments{td}{tr*Returns*\\{sub-section:F9193DAB-507E-4226-A2C9-580CE0E5E4F5_ret|text=|trigger=button}{sub-section}{sub-section:F9193DAB-507E-4226-A2C9-580CE0E5E4F5_ret|trigger=none|class=sIndent}com.servoy.extensions.plugins.window.menu.AbstractMenuItem{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=sigsee}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setArguments{span}{span:id=iets|style=float: left;}\(arguments){span}{td}{tr}{tr:id=des}{td}{*Also see*\\{sub-section:1FB26DE7F9193DAB-A11A507E-40714226-9377A2C9-EA4894E7C4FF580CE0E5E4F5_dessee|text=|trigger=button}{sub-section}{sub-section:1FB26DE7F9193DAB-A11A507E-40714226-9377A2C9-EA4894E7C4FF_des580CE0E5E4F5_see|class=sIndent|trigger=none|class=sIndent}Set the arguments that can be read by the defined method...{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prslink}{td}*ParametersExternal links*\\{sub-section:1FB26DE7F9193DAB-A11A507E-40714226-9377A2C9-EA4894E7C4FF580CE0E5E4F5_prssee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1FB26DE7F9193DAB-A11A507E-40714226-9377A2C9-EA4894E7C4FF_prs580CE0E5E4F5_link|class=sIndent|trigger=none}arguments
{sub-section}{divtd}{tdtr}{trbuilder-show}{tr:id=retsam}{td}*ReturnsSample*\\{sub-section:1FB26DE7F9193DAB-A11A507E-40714226-9377A2C9-EA4894E7C4FF580CE0E5E4F5_retsam|text=|trigger=button}{sub-section}{sub-section:1FB26DE7F9193DAB-A11A507E-40714226-9377A2C9-EA4894E7C4FF580CE0E5E4F5_retsam|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1FB26DE7-A11A-4071-9377-EA4894E7C4FF_see|text=|trigger=button}{sub-section}{sub-section:1FB26DE7-A11A-4071-9377-EA4894E7C4FF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1FB26DE7-A11A-4071-9377-EA4894E7C4FF_see|text=|trigger=button}{sub-section}{sub-section:1FB26DE7-A11A-4071-9377-EA4894E7C4FF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1FB26DE7-A11A-4071-9377-EA4894E7C4FF_sam|text=|trigger=button}{sub-section}{sub-section:1FB26DE7-A11A-4071-9377-EA4894E7C4FF_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubar.getMenu(2).getCheckBox(0|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 textkey of the item...
menu.setTextsetMnemonic("IT2Bee");
// SetEnable/disable the item selected...
menu.setSelectedsetEnabled(truefalse);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 4, 5 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///yourimage.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=1FBF6ECE-4846-4726-B1C7-2168171D573F}{tr:id=name}{td}h6.setEnabled{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setEnabled{span}{span:id=iets|style=float: left;}\(enabled){span}{td}{tr}{tr:id=des}{td}{sub-section:1FBF6ECE-4846-4726-B1C7-2168171D573F_desitem visible.
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DBA56E98-A404-4ADF-B4F9-D91921BD17D3}{tr:id=name}{td}h6.setAlign{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}setAlign{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:DBA56E98-A404-4ADF-B4F9-D91921BD17D3_des|text=|trigger=button}{sub-section}{sub-section:DBA56E98-A404-4ADF-B4F9-D91921BD17D3_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DBA56E98-A404-4ADF-B4F9-D91921BD17D3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573FD91921BD17D3_desprs|trigger=none|class=sIndent}Enable/disable the item...{sub-section}{div}{td}{tr}{builder-show}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573FD91921BD17D3_prsret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573FD91921BD17D3_prsret|trigger=none}enabled
|class=sIndent}[CheckBox]{sub-section}{div}{td}{tr}{trbuilder-show:id=retpermission=edit}{tr:id=see}{td}*ReturnsAlso see*\\{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573FD91921BD17D3_retsee|text=|trigger=button}{sub-section}{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573F_retD91921BD17D3_see|class=sIndent|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seelink}{td}*AlsoExternal seelinks*\\{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573FD91921BD17D3_see|text=|trigger=button}{sub-section}{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573FD91921BD17D3_seelink|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573FD91921BD17D3_seesam|text=|trigger=button}{sub-section}{sub-section:1FBF6ECEDBA56E98-4846A404-47264ADF-B1C7B4F9-2168171D573F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1FBF6ECE-4846-4726-B1C7-2168171D573F_sam|text=|trigger=button}{sub-section}{sub-section:1FBF6ECE-4846-4726-B1C7-2168171D573F_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubar.getMenu(2).getCheckBox(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the item selected...
menu.setSelected(true);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 4, 5 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///yourimage.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);
{codeD91921BD17D3_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7}{tr:id=name}{td}h6.setIcon{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}setIcon{span}{span:id=iets|style=float: left;}\(icon){span}{td}{tr}{tr:id=des}{td}{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_des|text=|trigger=button}{sub-section}{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_des|trigger=none|class=sIndent}Set the icon of the item...{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_prs|trigger=none}icon
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_ret|text=|trigger=button}{sub-section}{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_ret|trigger=none|class=sIndent}void[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_see|text=|trigger=button}{sub-section}{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_see|text=|trigger=button}{sub-section}{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_sam|text=|trigger=button}{sub-section}{sub-section:8FE7CE79C86B5645-8C70DF88-40534EAE-AE6CAD1C-54E5CBA1ECAEF0C37A6E55E7_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubarwindow.getMenu(2).getCheckBoxgetItem(0);
// Set the text of the item...
menu.setText("IT2BeServoy");
// Set the item selected..method for the item.
menu.setSelectedsetMethod(truecallback);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 45, 56 and so on to the callback method
menu.setArguments(methodArguments = ["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///yourimageTipOfTheDay16.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=F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC}{tr:id=name}{td}h6.setMnemonicsetMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{span}{span:id=iets|style=float: left; font-weight: bold;}setMnemonicsetMethod{span}{span:id=iets|style=float: left;}\(keymethod){span}{td}{tr}{tr:id=des}{td}{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_des|text=|trigger=button}{sub-section}{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_des|trigger=none|class=sIndent}Set the mnemonicmethod keyfor of the item...{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_prs|trigger=none}keymethod
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_ret|text=|trigger=button}{sub-section}{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_ret|trigger=none|class=sIndent}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_see|text=|trigger=button}{sub-section}{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_see|text=|trigger=button}{sub-section}{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_sam|text=|trigger=button}{sub-section}{sub-section:F2B7D3B1979ABEF6-D081D5AC-467C4EC2-A36AA63A-EB896ECC9B0B7EC68CE0CCBC_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubarwindow.getMenu(2).getCheckBoxgetItem(0);
// Set the text of the item...
menu.setText("IT2BeServoy");
// Set the method item selected...for the item.
menu.setSelectedsetMethod(truecallback);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 45, 56 and so on to the callback method
menu.setArguments(methodArguments = ["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///yourimageTipOfTheDay16.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=F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E}{tr:id=name}{td}h6.setSelectedsetMnemonic{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{span}{span:id=iets|style=float: left; font-weight: bold;}setMnemonic{span}{span:id=iets|style=float: left; font-weight: bold;}setSelected{span}{span:id=iets|style=float: left;}\(selected){span=float: left;}\(key){span}{td}{tr}{tr:id=des}{td}{sub-section:C4350CF9-9BE7-4AED-818E-59FF4F9EA11E_des|text=|trigger=button}{sub-section}{sub-section:C4350CF9-9BE7-4AED-818E-59FF4F9EA11E_des|trigger=none|class=sIndent}Set the mnemonic key of the item.{sub-section}{td}{tr}{tr:id=desprs}{td}*Parameters*\\{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_desprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_desprs|trigger=none|class=sIndent}Set the item selected...}key
{sub-section}{div}{td}{tr}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_prsret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_prsret|trigger=none}selected
|class=sIndent}com.servoy.extensions.plugins.window.menu.AbstractMenuItem{sub-section}{divtd}{tdtr}{trbuilder-show:permission=edit}{tr:id=retsee}{td}*ReturnsAlso see*\\{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_retsee|text=|trigger=button}{sub-section}{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C_ret59FF4F9EA11E_see|class=sIndent|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seelink}{td}*AlsoExternal seelinks*\\{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_see|text=|trigger=button}{sub-section}{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_seelink|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:C4350CF9-9BE7-4AED-818E-59FF4F9EA11E_sam|text=|trigger=button}{sub-section}{sub-section:F80BF70AC4350CF9-FEF19BE7-41034AED-98B7818E-AAB8CA8BE37C59FF4F9EA11E_seesam|textclass=sIndent|trigger=buttonnone}{sub-section}{sub-section:F80BF70A-FEF1-4103-98B7-AAB8CA8BE37C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F80BF70A-FEF1-4103-98B7-AAB8CA8BE37C_sam|text=|trigger=button}{sub-section}{sub-section:F80BF70A-FEF1-4103-98B7-AAB8CA8BE37C_sam|class=sIndent|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-showcode: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=BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{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:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_des|text=|trigger=button}{sub-section}{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_des|trigger=none|class=sIndent}Set the item visible...{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_prs|trigger=none}visible
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_ret|text=|trigger=button}{sub-section}{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_ret|trigger=none|class=sIndent}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_see|text=|trigger=button}{sub-section}{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_see|text=|trigger=button}{sub-section}{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_sam|text=|trigger=button}{sub-section}{sub-section:BAFC3413B3C15EC0-57BAC4E1-48FB4413-A339A570-D9B57593F5FA95302653B17A_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubarwindow.getMenu(2).getCheckBoxgetItem(0);
// Set the text of the item...
menu.setText("IT2BeServoy");
// Set the method for the item selected...
menu.setSelectedsetMethod(truecallback);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 45, 56 and so on to the callback method
menu.setArguments(methodArguments = ["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///yourimageTipOfTheDay16.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}