Page History
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:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#enabled] Enable/disable the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#methodArguments] Set the arguments that canare besent read byto the definedcallback method.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name] The name of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#selected] Select/unselect the checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#text] Get/set the text of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{table}\\ {table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|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}[Object]{td}{td}[#getClientProperty]\(key) Gets the specified client property for the element menu item/checkbox/radiobutton based on a key.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#putClientProperty]\(key, value) Sets the value for the specified element client property key of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setAccelerator]\(key) Set the accelerator key of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setAlign]\(booleanalign) Sets the alignment of the check boxcheckbox.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setBackgroundColor]\(backgroundColor) Set the background color of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setForegroundColor]\(foregroundColor) Set the foreground color of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setIcon]\(icon) Set the icon of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setMethod]\(method) Set the method for the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setMethod]\(method, arguments) Set the method for the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setMnemonic]\(key) Set the mnemonic key of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#setVisible]\(visible) Set the item visible.{td}{tr}{tbody}{table}\\ {table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=enabled|class=node}{tr:id=name}{td}h6.enabled{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:enabled_des|text=|trigger=button}{sub-section}{sub-section:enabled_des|trigger=none|class=sIndent}Replace with descriptionEnable/disable the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:enabled_snc|text=|trigger=button}{sub-section}{sub-section:enabled_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:enabled_prs|text=|trigger=button}{sub-section}{sub-section:enabled_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:enabled_ret|text=|trigger=button}{sub-section}{sub-section:enabled_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:enabled_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:enabled_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:enabled_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=methodArguments|class=node}{tr:id=name}{td}h6.methodArguments{td}{tr}{tr:id=des}{td}{sub-section:methodArguments_des|text=|trigger=button}{sub-section}{sub-section:methodArguments_des|trigger=none|class=sIndent}Set the arguments that can be read by the defined method.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:methodArguments_snc|text=|trigger=button}{sub-section}{sub-section:methodArguments_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:methodArguments_prs|text=|trigger=button}{sub-section}{sub-section:methodArguments_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:methodArguments_ret|text=|trigger=button}{sub-section}{sub-section:methodArguments_ret|trigger=none|class=sIndent}[Object]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:methodArguments_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArguments_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:methodArguments_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArguments_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:methodArguments_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArguments_sam|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 code:language=javascript} // 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 the first 5 arguments are fixed: // [0] item index // [1] parent item index // [2] isSelected boolean // [3] parent menu text // [4] menu text menuentry.methodArguments = ["a"17, "bdata"]; // 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); menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=name|class=node}{tr:id=name}{td}h6.name{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:name_des{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=methodArguments|class=node}{tr:id=name}{td}h6.methodArguments{td}{tr}{tr:id=des}{td}{sub-section:methodArguments_des|text=|trigger=button}{sub-section}{sub-section:methodArguments_des|trigger=none|class=sIndent}Set arguments that are sent to the callback method.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:methodArguments_snc|text=|trigger=button}{sub-section}{sub-section:namemethodArguments_dessnc|trigger=none|class=sIndent} Replace with descriptionversion info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncprs}{td}*SinceParameters*\\{sub-section:namemethodArguments_sncprs|text=|trigger=button}{sub-section}{sub-section:namemethodArguments_sncprs|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:namemethodArguments_prsret|text=|trigger=button}{sub-section}{sub-section:namemethodArguments_prsret|trigger=none|class=sIndent}[Object]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=retsee}{td}*ReturnsAlso see*\\{sub-section:namemethodArguments_retsee|text=|trigger=button}{sub-section}{sub-section:name_ret|trigger=none|div:class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:name_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:name_see|trigger=:methodArguments_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:namemethodArguments_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:namemethodArguments_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:namemethodArguments_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:namemethodArguments_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selected|class=node}{tr:id=name}{td}h6.selected{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:selected_des|text=|trigger=button}{sub-section}{sub-section:selected_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:selected_snc|text=|trigger=button}{sub-section}{sub-section:selected_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:selected_prs|text=|trigger=button}{sub-section}{sub-section:selected_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:selected_ret|text=|trigger=button}{sub-section}{sub-section:selected_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:selected_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:selected_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:selected_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_sam|trigger=none}{sub-sectioncode:language=javascript} // 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"]; {code}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=textname|class=node}{tr:id=name}{td}h6.textname{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:textname_des|text=|trigger=button}{sub-section}{sub-section:textname_des|trigger=none|class=sIndent}Replace with descriptionThe name of the menu item/checkbox/radiobutton. The name is used only internally, it is not visible in the user interface.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:textname_snc|text=|trigger=button}{sub-section}{sub-section:textname_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:textname_prs|text=|trigger=button}{sub-section}{sub-section:textname_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:textname_ret|text=|trigger=button}{sub-section}{sub-section:textname_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:textname_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:textname_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:textname_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:textname_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:textname_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:textname_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=doClick|class=node}{tr:id=name}{td}h6.doClick{td}{tr}{tr:id=sig}{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:doClick_des|text=|trigger=button}{sub-section}{sub-section:doClick_des|trigger=none|class=sIndent}Script the selection (emulate a mouse click) of the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:doClick_snc|text=|trigger=button}{sub-section}{sub-section:doClick_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:doClick_prs|text=|trigger=button}{sub-section}{sub-section:doClick_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:doClick_ret|text=|trigger=button}{sub-section}{sub-section:doClick_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:doClick_seecode:language=javascript} // 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"]; {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selected|class=node}{tr:id=name}{td}h6.selected{td}{tr}{tr:id=des}{td}{sub-section:selected_des|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClickselected_seedes|trigger=none|class=sIndent}Select/unselect the checkbox/radiobutton.{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksnc}{td}*External linksSince*\\{sub-section:doClickselected_linksnc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClickselected_linksnc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samprs}{td}*SampleParameters*\\{sub-section:doClickselected_samprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClickselected_samprs|trigger=none|class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{tdsub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:selected_ret|text=|trigger=button}{sub-section}{sub-section:selected_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{tbody}{tbody:id=getClientProperty|class=nodebuilder-show:permission=edit}{tr:id=namesee}{td}h6.getClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getClientProperty{span}{span:id=iets|style=float: left;}\(key){span*Also see*\\{sub-section:selected_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_see|trigger=none}{sub-section}{div}{td}{tr}{tr:id=des}{td}{sub-section:getClientProperty_des|text=|trigger=button}{sub-section}{sub-section:getClientProperty_des|trigger=none|class=sIndent}Gets the specified client property for the element based on a key.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snclink}{td}*SinceExternal links*\\{sub-section:getClientPropertyselected_snclink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientPropertyselected_snclink|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:getClientPropertyselected_prssam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientPropertyselected_prssam|trigger=none|class=sIndent}key {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:getClientProperty_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_sam|trigger=none}{code:language=javascript} // Gets the specified client property for the element based on a key. // NOTE: Depending on the operating system, a user interface property name may be available. var property = plugins.window.getClientProperty('ToolTipText'); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=putClientProperty|class=node}{tr:id=name}{td}h6.putClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}putClientProperty{span}{span:id=iets|style=float: left;}\(key, value){span}{td}{tr}{tr:id=des}{td}{sub-section:putClientProperty_des|text=|trigger=button}{sub-section}{sub-section:putClientProperty_des|trigger=none|class=sIndent}Sets the value for the specified element client property key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:putClientProperty_snc{code:language=javascript} // 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"]; {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=text|class=node}{tr:id=name}{td}h6.text{td}{tr}{tr:id=des}{td}{sub-section:text_des|text=|trigger=button}{sub-section}{sub-section:text_des|trigger=none|class=sIndent} Replace with version infoGet/set the text of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:putClientPropertytext_prssnc|text=|trigger=button}{sub-section}{sub-section:putClientPropertytext_prssnc|trigger=none|class=sIndent}key value Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:putClientPropertytext_retprs|text=|trigger=button}{sub-section}{sub-section:putClientPropertytext_retprs|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:putClientProperty_seetext_ret|text=|trigger=button}{sub-section}{sub-section:text_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:text_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertytext_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientPropertytext_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertytext_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putClientPropertytext_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertytext_sam|trigger=none}{code:language=javascript} // add Setsa thenew valuemenu forto the specifiedmenubar elementvar clientmenubar property= key. // NOTE: Depending on the operating system, a user interface property name may be available.plugins.window.getMenuBar(); var menu = menubar.addMenu(); menu.text = "New Menu"; // alternatively create a popup menu //var menu = plugins.window.putClientProperty('ToolTipText','some text'); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAccelerator|class=node}{tr:id=name}{td}h6.setAccelerator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{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:setAccelerator_des|text=|trigger=button}{sub-section}{sub-section:setAccelerator_des|trigger=none|class=sIndent}Set the accelerator key of the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAccelerator_snc|text=|trigger=button}{sub-section}{sub-section:setAccelerator_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setAccelerator_prs|text=|trigger=button}{sub-section}{sub-section:setAccelerator_prs|trigger=none|class=sIndent}key {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setAccelerator_ret|text=|trigger=button}{sub-section}{sub-section:setAccelerator_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAccelerator_see|text=|trigger=buttoncreatePopupMenu(); // 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"]; {code}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_see|trigger=nonetd}{sub-sectiontr}{divtr:class=lastDetailRow}{td}{trtd}{builder-showtr}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setAccelerator_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_link|trigger=none}{sub-section}{div}{td}{tr}{builder-showtbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=doClick|class=node}{tr:id=samname}{td}*Sample*\\{sub-section:setAccelerator_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_sam|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 //The first 5 arguments are fixed: // [0] item index // [1] parent item index // [2] isSelected boolean // [3] parent menu text // [4] menu text 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); menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAlign|class=node}{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;}\(boolean){span}{td}{tr}{tr:id=des}{td}{sub-section:setAlign_desh6.doClick{td}{tr}{tr:id=sig}{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:doClick_des|text=|trigger=button}{sub-section}{sub-section:doClick_des|trigger=none|class=sIndent}Script the selection (emulate a mouse click) of the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:doClick_snc|text=|trigger=button}{sub-section}{sub-section:doClick_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:doClick_prs|text=|trigger=button}{sub-section}{sub-section:doClick_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:doClick_ret|text=|trigger=button}{sub-section}{sub-section:doClick_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:doClick_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClick_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:doClick_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClick_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:doClick_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAligndoClick_dessam|trigger=none|class=sIndent}Sets}{code:language=javascript} // add a new menu to the alignmentmenubar ofvar themenubar check= box.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAlign_snc|text=|trigger=button}{sub-section}{sub-section:setAlign_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setAlign_prs|text=|trigger=button}{sub-section}{sub-section:setAlign_prs|trigger=none|class=sIndent}boolean {sub-section}{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(); {code}{sub-section}{div}{td}{tr}{tr:idclass=retlastDetailRow}{td}*Returns*\\{sub-section:setAlign_ret|text=|trigger=button}{sub-section}{sub-section:setAlign_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit{td}{tr}{tbody}{tbody:id=getClientProperty|class=node}{tr:id=name}{td}h6.getClientProperty{td}{tr}{tr:id=seesig}{td}*Also see*\\{sub-section:setAlign_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAlign_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getClientProperty{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=linkdes}{td}*External links*\\{sub-section:setAligngetClientProperty_linkdes|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAligngetClientProperty_linkdes|trigger=none|class=sIndent}Gets the specified client property for the menu item/checkbox/radiobutton based on a key.{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=samsnc}{td}*SampleSince*\\{sub-section:setAligngetClientProperty_samsnc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAlign_sam|trigger=none}{code:language=javascript} var align = checkBox.setAlign(true{sub-section:getClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:getClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:getClientProperty_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_sam|trigger=none}{code:language=javascript} // 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); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=putClientProperty|class=node}{tr:id=name}{td}h6.putClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}putClientProperty{span}{span:id=iets|style=float: left;}\(key, value){span}{td}{tr}{tr:id=des}{td}{sub-section:putClientProperty_des|text=|trigger=button}{sub-section}{sub-section:putClientProperty_des|trigger=none|class=sIndent}Sets the value for the specified client property key of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:putClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:putClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:putClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key \{[Object]} value {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:putClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:putClientProperty_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putClientProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_sam|trigger=none}{code:language=javascript} // 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); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAccelerator|class=node}{tr:id=name}{td}h6.setAccelerator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}setAccelerator{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:setAccelerator_des|text=|trigger=button}{sub-section}{sub-section:setAccelerator_des|trigger=none|class=sIndent}Set the accelerator key of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAccelerator_snc|text=|trigger=button}{sub-section}{sub-section:setAccelerator_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setAccelerator_prs|text=|trigger=button}{sub-section}{sub-section:setAccelerator_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setAccelerator_ret|text=|trigger=button}{sub-section}{sub-section:setAccelerator_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAccelerator_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setAccelerator_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setAccelerator_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_sam|trigger=none}{code:language=javascript} // 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"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAlign|class=node}{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;}\(align){span}{td}{tr}{tr:id=des}{td}{sub-section:setAlign_des|text=|trigger=button}{sub-section}{sub-section:setAlign_des|trigger=none|class=sIndent}Sets the alignment of the checkbox.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAlign_snc|text=|trigger=button}{sub-section}{sub-section:setAlign_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setAlign_prs|text=|trigger=button}{sub-section}{sub-section:setAlign_prs|trigger=none|class=sIndent}\{[Boolean]} align {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setAlign_ret|text=|trigger=button}{sub-section}{sub-section:setAlign_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAlign_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAlign_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setAlign_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAlign_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setAlign_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAlign_sam|trigger=none}{code:language=javascript} // 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); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setBackgroundColor|class=node}{tr:id=name}{td}h6.setBackgroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setBackgroundColor{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:setBackgroundColor_des|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_des|trigger=none|class=sIndent}Set the background color of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setBackgroundColor_snc|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setBackgroundColor_prs|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setBackgroundColor_ret|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setBackgroundColor_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColor_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setBackgroundColor_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColor_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setBackgroundColor_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColor_sam|trigger=none}{code:language=javascript} // 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"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setBackgroundColorsetForegroundColor|class=node}{tr:id=name}{td}h6.setBackgroundColorsetForegroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setBackgroundColorsetForegroundColor{span}{span:id=iets|style=float: left;}\(backgroundColor){span}{td}{tr}{tr:id=des}{td}{sub-section:setBackgroundColorsetForegroundColor_des|text=|trigger=button}{sub-section}{sub-section:setBackgroundColorsetForegroundColor_des|trigger=none|class=sIndent}Set the backgroundforeground color of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setBackgroundColorsetForegroundColor_snc|text=|trigger=button}{sub-section}{sub-section:setBackgroundColorsetForegroundColor_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setBackgroundColorsetForegroundColor_prs|text=|trigger=button}{sub-section}{sub-section:setBackgroundColorsetForegroundColor_prs|trigger=none|class=sIndent}backgroundColor {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setBackgroundColorsetForegroundColor_ret|text=|trigger=button}{sub-section}{sub-section:setBackgroundColorsetForegroundColor_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setBackgroundColorsetForegroundColor_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColorsetForegroundColor_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setBackgroundColorsetForegroundColor_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColorsetForegroundColor_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setBackgroundColorsetForegroundColor_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColorsetForegroundColor_sam|trigger=none}{code:language=javascript} var// menuadd = 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 //The first 5 arguments are fixed: // [0] item index // [1] parent item index // [2] isSelected boolean // [3] parent menu text // [4] menu text 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); menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'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"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setForegroundColorsetIcon|class=node}{tr:id=name}{td}h6.setForegroundColorsetIcon{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;}setForegroundColorsetIcon{span}{span:id=iets|style=float: left;}\(foregroundColor){span}{td}{tr}{tr:id=des}{td}{sub-section:setForegroundColorsetIcon_des|text=|trigger=button}{sub-section}{sub-section:setForegroundColorsetIcon_des|trigger=none|class=sIndent}Set the foregroundicon color of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setForegroundColorsetIcon_snc|text=|trigger=button}{sub-section}{sub-section:setForegroundColorsetIcon_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setForegroundColorsetIcon_prs|text=|trigger=button}{sub-section}{sub-section:setForegroundColorsetIcon_prs|trigger=none|class=sIndent}foregroundColor {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setForegroundColorsetIcon_ret|text=|trigger=button}{sub-section}{sub-section:setForegroundColorsetIcon_ret|trigger=none|class=sIndent}void[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setForegroundColorsetIcon_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setForegroundColorsetIcon_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setForegroundColorsetIcon_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setForegroundColorsetIcon_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setForegroundColorsetIcon_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setForegroundColorsetIcon_sam|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); // Setadd thea argumentsnew thatmenu canto bethe readmenubar byvar themenubar defined= method. - array elements 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 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); menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'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"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setIconsetMethod-Function|class=node}{tr:id=name}{td}h6.setIconsetMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}setIconsetMethod{span}{span:id=iets|style=float: left;}\(iconmethod){span}{td}{tr}{tr:id=des}{td}{sub-section:setIconsetMethod-Function_des|text=|trigger=button}{sub-section}{sub-section:setIconsetMethod-Function_des|trigger=none|class=sIndent}Set the iconmethod offor the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setIconsetMethod-Function_snc|text=|trigger=button}{sub-section}{sub-section:setIconsetMethod-Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setIconsetMethod-Function_prs|text=|trigger=button}{sub-section}{sub-section:setIconsetMethod-Function_prs|trigger=none|class=sIndent}icon}\{[Function]} method {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setIconsetMethod-Function_ret|text=|trigger=button}{sub-section}{sub-section:setIconsetMethod-Function_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setIconsetMethod-Function_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setIconsetMethod-Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setIconsetMethod-Function_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setIconsetMethod-Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setIconsetMethod-Function_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setIconsetMethod-Function_sam|trigger=none}{code:language=javascript} var menu = plugins.window.getMenu(2).getItem(} // 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); // Set alternatively add a checkbox at the first textposition of//var theentry item.= menu.setTextaddCheckBox("Servoy"0); // Set or alternatively add a radiobutton at the first methodposition for//var theentry item.= menu.setMethodaddRadioButton(callback0); // Setdisable 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 //The first 5 arguments are fixed: // [0] item index // [1] parent item index // [2] isSelected boolean // [3] parent menu text // [4] menu text 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); menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff')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"]; {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setMethod-Function_ObjectArray|class=node}{tr:id=name}{td}h6.setMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}setMethod{span}{span:id=iets|style=float: left;}\(method, arguments){span}{td}{tr}{tr:id=des}{td}{sub-section:setMethod-Function_ObjectArray_des|text=|trigger=button}{sub-section}{sub-section:setMethod-Function_ObjectArray_des|trigger=none|class=sIndent}Set the method for the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setMethod-Function_ObjectArray_snc|text=|trigger=button}{sub-section}{sub-section:setMethod-Function_ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setMethod-Function_ObjectArray_prs|text=|trigger=button}{sub-section}{sub-section:setMethod-Function_ObjectArray_prs|trigger=none|class=sIndent}\{[Function]} method \{[Object]\[]} arguments {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setMethod-Function_ObjectArray_ret|text=|trigger=button}{sub-section}{sub-section:setMethod-Function_ObjectArray_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setMethod-Function_ObjectArray_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMethod-Function_ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setMethod-Function_ObjectArray_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMethod-Function_ObjectArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setMethodsetMethod-Function_ObjectArray_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMethod-Function_ObjectArray_sam|trigger=none}{code:language=javascript} // add a new menu to the menubar var menumenubar = 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 //The first 5 arguments are fixed: // [0] item index // [1] parent item index // [2] isSelected boolean // [3] parent menu text // [4] menu text 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); menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff').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"]; {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setMnemonic|class=node}{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:setMnemonic_des|text=|trigger=button}{sub-section}{sub-section:setMnemonic_des|trigger=none|class=sIndent}Set the mnemonic key of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setMnemonic_snc|text=|trigger=button}{sub-section}{sub-section:setMnemonic_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setMnemonic_prs|text=|trigger=button}{sub-section}{sub-section:setMnemonic_prs|trigger=none|class=sIndent}key {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setMnemonic_ret|text=|trigger=button}{sub-section}{sub-section:setMnemonic_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setMnemonic_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setMnemonic_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setMnemonic_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_sam|trigger=none}{code:language=javascript} var// menuadd = 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 //The first 5 arguments are fixed: // [0] item index // [1] parent item index // [2] isSelected boolean // [3] parent menu text // [4] menu text 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 4a 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"); // Setalso define thea mnemonic key of the item. menu.entry.setMnemonic("ey"); // Enable/disable the item. menu.setEnabled(falseset a custom background color entry.setBackgroundColor("#111111"); // set Seta thecustom itemforeground visible.color menuentry.setVisiblesetForegroundColor(true"#EE5555"); // set an icon menuentry.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'setIcon("media:///yourimage.gif"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setVisible|class=node}{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:setVisible_des|text=|trigger=button}{sub-section}{sub-section:setVisible_des|trigger=none|class=sIndent}Set the item visible.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setVisible_snc|text=|trigger=button}{sub-section}{sub-section:setVisible_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setVisible_prs|text=|trigger=button}{sub-section}{sub-section:setVisible_prs|trigger=none|class=sIndent}\{[Boolean]} visible {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setVisible_ret|text=|trigger=button}{sub-section}{sub-section:setVisible_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setVisible_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setVisible_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setVisible_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_sam|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} // add a new menu to the callbackmenubar methodvar //Themenubar first 5 arguments are fixed: // [0] item index // [1] parent item index // [2] isSelected boolean // [3] parent menu text // [4] menu text menu.methodArguments = ["a","b"]; // Set the icon of the item. menu.setIcon("media:///TipOfTheDay16.gif"= 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); // Setadd thea acceleratorcheckbox keyvar of the item.entry_two = menu.setAcceleratoraddCheckBox("metaanother 4entry", feedback); // Setadd thea mnemonicradiobutton keyvar ofentry_three the= item. menu.setMnemonicaddRadioButton("e"yet another entry", feedback); // Enable/disablehide the menu item. menuentry_one.setEnabledsetVisible(false); // make Setsure the checkbox itemis visible. menuentry_two.setVisible(true); // menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'hide the radiobutton entry_three.setVisible(false); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |
Overview
Content Tools
Activity