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}Constants Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#ALIGN_CENTER] Constant for centering menu items/checkbox/radiobuttons at creation.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#ALIGN_LEFT] Constant for left aligning menu items/checkbox/radiobuttons at creation.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#ALIGN_RIGHT] Constant for right aligning menu items/checkbox/radiobuttons at creation.{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}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 based 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}[MenuItem]{td}{td}[#setAccelerator]\(key) Set the accelerator key of the menu item/checkbox/radiobutton.{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}[MenuItem]{td}{td}[#setIcon]\(icon) Set the icon of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setMethod]\(method) Set the method for the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setMethod]\(method, arguments) Set the method for the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setMnemonic]\(key) Set the mnemonic key of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setVisible]\(visible) Set the item visible.{td}{tr}{tbody}{table}\\ {table:id=constant|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=ALIGN_CENTER|class=node}{tr:id=name}{td}h6.ALIGN_CENTER{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ALIGN_CENTER_des|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_des|trigger=none|class=sIndent}Replace with description{sub-Constant for centering menu items/checkbox/radiobuttons at creation.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:ALIGN_CENTER_snc|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_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:ALIGN_CENTER_prs|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ALIGN_CENTER_ret|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ALIGN_CENTER_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ALIGN_CENTER_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:ALIGN_CENTER_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_LEFT|class=node}{tr:id=name}{td}h6.ALIGN_LEFT{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ALIGN_LEFT_des|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}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 left aligned menu item menu.addMenuItem("significantly long text", feedback, null, null, true, MenuItem.ALIGN_LEFT); // add a centered checkbox menu.addCheckBox("a bit shorter", feedback, null, null, true, MenuItem.ALIGN_CENTER); // add a right aligned radiobutton menu.addRadioButton("short", feedback, null, null, true, MenuItem.ALIGN_RIGHT); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_LEFT|class=node}{tr:id=name}{td}h6.ALIGN_LEFT{td}{tr}{tr:id=des}{td}{sub-section:ALIGN_LEFT_des|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_des|trigger=none|class=sIndent}Constant for left aligning menu items/checkbox/radiobuttons at creation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:ALIGN_LEFT_snc|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_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:ALIGN_LEFT_prs|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ALIGN_LEFT_ret|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ALIGN_LEFT_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ALIGN_LEFT_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:ALIGN_LEFT_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_RIGHT|class=node}{tr:id=name}{td}h6.ALIGN_RIGHT{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ALIGN_RIGHT_des|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_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:ALIGN_RIGHT_snc|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\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 left aligned menu item menu.addMenuItem("significantly long text", feedback, null, null, true, MenuItem.ALIGN_LEFT); // add a centered checkbox menu.addCheckBox("a bit shorter", feedback, null, null, true, MenuItem.ALIGN_CENTER); // add a right aligned radiobutton menu.addRadioButton("short", feedback, null, null, true, MenuItem.ALIGN_RIGHT); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_RIGHT|class=node}{tr:id=name}{td}h6.ALIGN_RIGHT{td}{tr}{tr:id=des}{td}{sub-section:ALIGN_RIGHT_prsdes|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_prsdes|trigger=none|class=sIndent}Constant for right aligning menu items/checkbox/radiobuttons at creation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=retsnc}{td}*ReturnsSince*\\{sub-section:ALIGN_RIGHT_retsnc|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_retsnc|trigger=none|class=sIndent}[Number] Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:ALIGN_RIGHT_seeprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_seeprs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:ALIGN_RIGHT_linkret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_linkret|trigger=none|class=sIndent}[Number]{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samsee}{td}*SampleAlso see*\\{sub-section:ALIGN_RIGHT_samsee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_samsee|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{trbuilder-show:classpermission=lastDetailRowedit}{tdtr:id=link}{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*External links*\\{sub-section:ALIGN_RIGHT_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ALIGN_RIGHT_sam|text=|trigger=button}{sub-section}{sub-section:enabled_des|trigger=none|div:class=sIndent}Replace with description{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:ALIGN_RIGHT_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 left aligned menu item menu.addMenuItem("significantly long text", feedback, null, null, true, MenuItem.ALIGN_LEFT); // add a centered checkbox menu.addCheckBox("a bit shorter", feedback, null, null, true, MenuItem.ALIGN_CENTER); // add a right aligned radiobutton menu.addRadioButton("short", feedback, null, null, true, MenuItem.ALIGN_RIGHT); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{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=edittbody}{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}{tr:id=linkdes}{td}*External links*\\{sub-section:enabled_linkdes|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_linkdes|trigger=none|class=sIndent}Enable/disable the menu item/checkbox/radiobutton.{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samsnc}{td}*SampleSince*\\{sub-section:enabled_samsnc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_samsnc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{trbuilder-show:class=lastDetailRow}{td}{tdpermission=edit}{tr}{tbody}{tbody:id=methodArguments|class=nodeprs}{tr:id=name}{td}h6.methodArguments{td}{tr}{tr:id=des}{td}td}*Parameters*\\{sub-section:methodArgumentsenabled_desprs|text=|trigger=button}{sub-section}{sub-section:methodArgumentsenabled_desprs|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=sncret}{td}*SinceReturns*\\{sub-section:methodArgumentsenabled_sncret|text=|trigger=button}{sub-section}{sub-section:methodArgumentsenabled_sncret|trigger=none|class=sIndent} Replace with version info[Boolean]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prssee}{td}*ParametersAlso see*\\{sub-section:methodArgumentsenabled_prssee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArgumentsenabled_prssee|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retlink}{td}*ReturnsExternal links*\\{sub-section:methodArgumentsenabled_retlink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArgumentsenabled_retlink|trigger=none|class=sIndent}[Object]\[]{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=seesam}{td}*Also seeSample*\\{sub-section:methodArgumentsenabled_seesam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArgumentsenabled_seesam|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 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: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=namemethodArguments|class=node}{tr:id=name}{td}h6.namemethodArguments{td}{tr}{builder-showtr:permission=edit}{tr:id=id=des}{td}{sub-section:namemethodArguments_des|text=|trigger=button}{sub-section}{sub-section:namemethodArguments_des|trigger=none|class=sIndent}Replace with descriptionSet arguments that are sent to the callback method.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:namemethodArguments_snc|text=|trigger=button}{sub-section}{sub-section:namemethodArguments_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:namemethodArguments_prs|text=|trigger=button}{sub-section}{sub-section:namemethodArguments_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:namemethodArguments_ret|text=|trigger=button}{sub-section}{sub-section:namemethodArguments_ret|trigger=none|class=sIndent}[Object]\[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:namemethodArguments_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:namemethodArguments_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-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=text|class=node}{tr:id=name}{td}h6.textcode: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=name|class=node}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}{sub-section:name_des|text=|trigger=button}{sub-section}{sub-section:name_des|trigger=none|class=sIndent}The 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:permission=edit}{tr:id=dessnc}{td}*Since*\\{sub-section:textname_dessnc|text=|trigger=button}{sub-section}{sub-section:text_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:text_snc|text=|trigger=button}{sub-section}{sub-section:text_snc|trigger=name_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-showcode: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}{sub-section:selected_des|trigger=none|class=sIndent}Select/unselect the checkbox/radiobutton.{sub-section}{td}{tr}{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}{tr:id=sam}{td}*Sample*\\{sub-section:selected_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_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 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}Get/set the text of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:text_snc|text=|trigger=button}{sub-section}{sub-section:text_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:text_prs|text=|trigger=button}{sub-section}{sub-section:text_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:text_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:text_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:text_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:text_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:text_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:text_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 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}{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_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:doClick_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); // simulate a click on the entry entry.doClick(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getClientProperty|class=node}{tr:id=name}{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}{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 menu item/checkbox/radiobutton based on a key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientProperty_snc|text=|trigger=button}{sub-section}{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:doClickgetClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:doClickgetClientProperty_ret|trigger=none|class=sIndent}void[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=seelink}{td}*AlsoExternal seelinks*\\{sub-section:doClickgetClientProperty_seelink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClickgetClientProperty_seelink|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:doClickgetClientProperty_linksam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClickgetClientProperty_linksam|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:doClick_sam|trigger=none}{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(=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=getClientPropertyputClientProperty|class=node}{tr:id=name}{td}h6.getClientPropertyputClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]void{span}{span:id=iets|style=float: left; font-weight: bold;}getClientPropertyputClientProperty{span}{span:id=iets|style=float: left;}\(key, value){span}{td}{tr}{tr:id=des}{td}{sub-section:getClientPropertyputClientProperty_des|text=|trigger=button}{sub-section}{sub-section:getClientPropertyputClientProperty_des|trigger=none|class=sIndent}GetsSets the value for the specified client property forkey of the element based on a keymenu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientPropertyputClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:getClientPropertyputClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientPropertyputClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:getClientPropertyputClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key \{[Object]} value {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientPropertyputClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:getClientPropertyputClientProperty_ret|trigger=none|class=sIndent}[Object]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:getClientPropertyputClientProperty_seelink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientPropertyputClientProperty_seelink|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:getClientPropertyputClientProperty_linksam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientPropertyputClientProperty_linksam|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: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=putClientPropertysetAccelerator|class=node}{tr:id=name}{td}h6.putClientPropertysetAccelerator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}putClientPropertysetAccelerator{span}{span:id=iets|style=float: left;}\(key, value){span}{td}{tr}{tr:id=des}{td}{sub-section:putClientPropertysetAccelerator_des|text=|trigger=button}{sub-section}{sub-section:putClientPropertysetAccelerator_des|trigger=none|class=sIndent}SetsSet the valueaccelerator key forof the specified element client property keymenu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putClientPropertysetAccelerator_snc|text=|trigger=button}{sub-section}{sub-section:putClientPropertysetAccelerator_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:putClientPropertysetAccelerator_prs|text=|trigger=button}{sub-section}{sub-section:putClientPropertysetAccelerator_prs|trigger=none|class=sIndent}key value {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:putClientPropertysetAccelerator_ret|text=|trigger=button}{sub-section}{sub-section:putClientPropertysetAccelerator_ret|trigger=none|class=sIndent}void[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putClientPropertysetAccelerator_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertysetAccelerator_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientPropertysetAccelerator_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertysetAccelerator_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setAccelerator_sam|text=|trigger=button}{sub-section:putClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_sam|trigger=none}{code:language=javascript} // Sets the value for the specified element client property key. // NOTE: Depending on the operating system, a user interface property name may be available. plugins.window.putClientProperty('ToolTipText','some text'}{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=setAcceleratorsetBackgroundColor|class=node}{tr:id=name}{td}h6.setAcceleratorsetBackgroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]void{span}{span:id=iets|style=float: left; font-weight: bold;}setAcceleratorsetBackgroundColor{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=des}{td}{sub-section:setAcceleratorsetBackgroundColor_des|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetBackgroundColor_des|trigger=none|class=sIndent}Set the acceleratorbackground keycolor of the menu item/checkbox/radiobutton.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAcceleratorsetBackgroundColor_snc|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetBackgroundColor_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:setAcceleratorsetBackgroundColor_prs|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetBackgroundColor_prs|trigger=none|class=sIndent}key {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setAcceleratorsetBackgroundColor_ret|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetBackgroundColor_ret|trigger=none|class=sIndent}[MenuItem]void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAcceleratorsetBackgroundColor_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAcceleratorsetBackgroundColor_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setAcceleratorsetBackgroundColor_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAcceleratorsetBackgroundColor_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setAcceleratorsetBackgroundColor_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAcceleratorsetBackgroundColor_sam|trigger=none}{code:language=javascript} var menu = plugins.window.getMenu(2).getItem(0); // Set the text of the item. menu.setText("Servoy");language=javascript} // Setadd thea method for the item. menu.setMethod(callback); // Setnew menu to the argumentsmenubar thatvar canmenubar 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= 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 the mnemonic key of the item. menudefine a mnemonic entry.setMnemonic("ey"); // Enable/disable the item. menu.setEnabled(false set a custom background color entry.setBackgroundColor("#111111"); // set Seta thecustom itemforeground visible.color menuentry.setVisiblesetForegroundColor(true"#EE5555"); // menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'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 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"); // Setset a thecustom itemforeground visible.color menuentry.setVisiblesetForegroundColor(true"#EE5555"); // menu.setBackgroundColor('#ff0000'); menu.setForegroundColor('#0000ff'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[MenuItem]{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[MenuItem]{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); // 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'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=setIconsetMethod-Function|class=node}{tr:id=name}{td}h6.setIconsetMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{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}[MenuItem]{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}}{code:language=javascript} // add a new menu to the menubar var menumenubar = plugins.window.getMenugetMenuBar(2).getItem(0); ); var menu = menubar.addMenu(); menu.text = "New Menu"; // Setalternatively thecreate texta ofpopup the item.menu //var menu.setText("Servoy" = plugins.window.createPopupMenu(); // Setadd a menu item at the first methodposition forin the item. menu var entry = menu.setMethodaddMenuItem(callback0); // Set alternatively add a checkbox at 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') 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=setMethod-Function_ObjectArray|class=node}{tr:id=name}{td}h6.setMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{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}methodclass=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}[MenuItem]{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:setMethod_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMethod_sam|trigger=none}{code:language=javascript} var menu = plugins.window.getMenu(2).getItem({sub-section:setMethod-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 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); // Setor alternatively add a radiobutton at the text of the item.first position //var entry = menu.setTextaddRadioButton("Servoy"0); // Setdisable the method fornewly added entry entry.enabled = false; // give a name to the item.entry menu.setMethod(callback)(the name is not visible anywhere) entry.name = "my_name"; // Setmake the argumentsentry thatselected can(affects becheckboxes readand by the defined method. - array elements will be passed as arguments 5, 6 and so on toradiobuttons) entry.selected = true; // set the text of the entry entry.text = "menu entry"; // set the callback method entry.setMethod(feedback); //The firstset 5the arguments areto fixed:be // [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')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;}[MenuItem]{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}[MenuItem]{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 menu = plugins.window.getMenu(2).getItem(0); // Setadd thea 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'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=setVisible|class=node}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{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}[MenuItem]{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 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{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_one = menu.addMenuItem("an entry", feedback); // add a checkbox var entry_two = menu.addCheckBox("another entry", feedback); // add a radiobutton var entry_three = menu.addRadioButton("yet another entry", feedback); // hide the menu item entry_one.setVisible(false); // make 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