Page History
Wiki Markup |
---|
{hiddendiv:style=display:none} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACTAUTO CHANGES FROMUPDATE THE PAGECONTENT ANDTHROUGH MERGETHE THEM BACK INTO SERVOY SOURCE{hiddenDOC GENERATOR{div} {sub-sectiondiv:id=description|text=}{sub-sectiondiv}\\ {table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{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:width=80px|padding=0px}{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 arguments that are sent to the callback 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:width=80px|padding=0px}{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 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 client property key of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setAccelerator]\() Set the accelerator key of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setBackgroundColor]\() Set the background color of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setForegroundColor]\() Set the foreground color of the menu item/checkbox/radiobutton.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setIcon]\() 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]\() 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:width=100%|padding=0px}{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-showtr:permission=edit}{tr:id=des}{td}{sub-section:ALIGN_CENTER_des|trigger=button|text=}{sub-section}{sub-section:ALIGN_CENTER_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_CENTER_snc|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{sub-section}{sub-section:ALIGN_CENTER_ret|trigger=none|class=sIndent}[Number]{sub-sectionid=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{div}{td}{tr}{builder-showtr:permissionclass=editlastDetailRow}{tr:id=seetd}{td}*Also see*\\{sub-section:ALIGN_CENTER_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit{tr}{tbody}{tbody:id=ALIGN_LEFT}{tr:id=name}{td}h6.ALIGN_LEFT{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:ALIGN_CENTER_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_link|trigger=none}{sub-section}[Number]{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ALIGN_CENTER_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_sam|trigger=none}{codecode: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=nodeRIGHT}{tr:id=name}{td}h6.ALIGN_LEFTRIGHT{td}{tr}{builder-show:permission=edit}{tr:id=desret}{td}{sub-section:ALIGN_LEFT_des|trigger=button|text=}{sub-section}{sub-section:ALIGN_LEFT_des|trigger=none|*Returns*\\{div:class=sIndent}Replace with description{sub-section[Number]{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:ALIGN_LEFT_snc|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_link|trigger=none}{sub-section}div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ {table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=enabled}{tr:id=name}{td}h6.enabled{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ALIGN_LEFT_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_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 item at the first position in the menu var entry = menu.addMenuItem("significantly long text", feedback, null, null, true, MenuItem.ALIGN_LEFT0); // alternatively add a checkbox at the first position //var entry = menu.addCheckBox(0); // or alternatively add a centered checkbox radiobutton at the first position //var entry = menu.addCheckBox("a bit shorter", feedback, null, null, true, MenuItem.ALIGN_CENTER)addRadioButton(0); // disable the newly added entry entry.enabled = false; // addgive a name rightto alignedthe radiobuttonentry 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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ALIGN_RIGHT_des|trigger=button|text=}{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|trigger=button|text=}{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*\\{sub-section:ALIGN_RIGHT_prs|trigger=button|text=}{sub-section}{sub-section:ALIGN_RIGHT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ALIGN_RIGHT_ret|trigger=button|text=}{sub-section}{sub-section:ALIGN_RIGHT_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ALIGN_RIGHT_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ALIGN_RIGHT_link|trigger=button|text=}{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|trigger=button|text=}{sub-section}{div:class=sIndent}{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}{tbody}{table}\\ {table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=enabled|class=node(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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=methodArguments}{tr:id=name}{td}h6.methodArguments{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=name}{tr:id=name}{td}h6.enabledname{td}{tr}{builder-show:permission=edit}{tr:id=desret}{td}{sub-section:enabled_des|trigger=button|text=}{sub-section}{sub-section:enabled_des|trigger=none|*Returns*\\{div:class=sIndent}Replace with description{sub-section[String]{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:enabled_snc|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:enabled_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_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=methodArguments|class=node}{tr:id=name}{td}h6.methodArguments{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:methodArguments_des|trigger=button|text=}{sub-section}{sub-section:methodArguments_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:methodArguments_snc|trigger=button|text=}{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|trigger=button|text=}{sub-section}{sub-section:methodArguments_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-showdiv:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selected}{tr:id=name}{td}h6.selected{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=text}{tr:id=name}{td}h6.text{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:methodArguments_ret|trigger=button|text=}{sub-section}{sub-section:methodArguments_ret|trigger=none|div:class=sIndent}[Object]\[String]{sub-sectiondiv}{td}{tr}{builder-show:permission=edit}{tr:id=seesam}{td}*Also seeSample*\\{sub-section:methodArguments_see|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:methodArguments_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 acode: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}\\ {tbodytable:id=namefunction|class=nodeservoy sDetail}{colgroup}{tr:id=namecolumn:width=100%|padding=0px}{tdcolumn}h6.name{tdcolgroup}{tr}{builder-show:permission=editstyle=height: 30px;}{trth:id=descolspan=1}Method Details{th}{tdtr}{sub-section:name_des|trigger=button|text=}{sub-section}{sub-section:name_des|trigger=none|class=sIndent}Replace with description{sub-section}tbody:id=doClick}{tr:id=name}{td}h6.doClick{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsig}{td}*Since*\\{sub-section:name_snc|trigger=button|text=}{sub-section}{sub-section:name_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}doClick{span}{span}\(){span}{td}{tr}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:name_prs|trigger=button|text=}{sub-section}{sub-section:name_prs|trigger=none|div:class=sIndent}void{sub-sectiondiv}{td}{tr}{builder-show}{tr:id=retsam}{td}*ReturnsSample*\\{sub-section:name_ret|trigger=button|text=}{sub-section}{sub-section:name_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:name_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:name_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:name_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:name_link|trigger=none}{sub-section}{divdiv:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{trtbody:id=samgetClientProperty-Object}{tr:id=name}{td}h6.getClientProperty{td}*Sample*\\{sub-section:name_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:name_sam|trigger=none}{code:language=javascript} // add }{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}getClientProperty{span}{span}\(key){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} key {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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"menu entry", feedback); // alternatively add a checkbox at the first position //var entry = menu.addCheckBox(0"menu entry", feedback); // or alternatively add a radiobutton at the first position //var entry = menu.addRadioButton(0)"menu entry", feedback); // NOTE: Depending disableon the newly added entry entry.enabled = false; operating system, a user interface property name may be available. // giveset athe nametooltip toof 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-sectionmenu 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selected|class=nodeputClientProperty-Object_Object}{tr:id=name}{td}h6.selectedputClientProperty{td}{tr}{builder-show:permission=edit}{tr:id=dessig}{td}{sub-section:selected_des|trigger=button|text=}{sub-section}{sub-section:selected_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=editspan:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}putClientProperty{span}{span}\(key, value){span}{td}{tr}{tr:id=sncprs}{td}*SinceParameters*\\{sub-section:selected_snc|trigger=button|text=}{sub-section}{sub-section:selected_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}\{[Object]} key \{[Object]} value {div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:selected_prs|trigger=button|text=}{sub-section}{sub-section:selected_prs|trigger=none|div:class=sIndent}void{sub-sectiondiv}{td}{tr}{builder-show}{tr:id=retsam}{td}*ReturnsSample*\\{sub-section:selected_ret|trigger=button|text=}{sub-section}{sub-section:selected_ret|trigger=none|div:class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:selected_see|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:selected_sam|trigger=none}{code:language=javascript} // add a new menu to the menubar }{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 menumenuIndex = menubar.addMenu(); menu.text = getMenuIndexByText("New Menu"; // alternatively create a popup menu); //var menu = pluginsmenubar.window.createPopupMenugetMenu(menuIndex); // add a menu item at the first position in the menu var entry = menu.addMenuItemgetItem(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-sectionputClientProperty("ToolTipText", originalTooltip); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAccelerator}{tr:id=name}{td}h6.setAccelerator{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[MenuItem]{span}{span:style=font-weight: bold;}setAccelerator{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[MenuItem]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=text|class=nodesetBackgroundColor}{tr:id=name}{td}h6.textsetBackgroundColor{td}{tr}{builder-show:permission=edit}{tr:id=dessig}{td}{sub-section:text_des|trigger=button|text=}{sub-section}{sub-section:text_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=editspan:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setBackgroundColor{span}{span}\(){span}{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:text_snc|trigger=button|text=}{sub-section}{sub-section:text_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}void{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:text_prs|trigger=button|text=}{sub-section}{sub-section:text_prs|trigger=none|div:class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:text_ret|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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:width=100%|padding=0px}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:doClick_des|trigger=button|text=}{sub-section}{sub-section:doClick_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:doClick_snc|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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-Object|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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getClientProperty-Object_des|trigger=button|text=}{sub-section}{sub-section:getClientProperty-Object_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:getClientProperty-Object_snc|trigger=button|text=}{sub-section}{sub-section:getClientProperty-Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientProperty-Object_prs|trigger=button|text=}{sub-section}{sub-section:getClientProperty-Object_prs|trigger=none|class=sIndent}\{[Object]} key {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientProperty-Object_ret|trigger=button|text=}{sub-section}{sub-section:getClientProperty-Object_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientProperty-Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getClientProperty-Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientProperty-Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getClientProperty-Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientProperty-Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getClientProperty-Object_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-Object_Object|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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:putClientProperty-Object_Object_des|trigger=button|text=}{sub-section}{sub-section:putClientProperty-Object_Object_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:putClientProperty-Object_Object_snc|trigger=button|text=}{sub-section}{sub-section:putClientProperty-Object_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:putClientProperty-Object_Object_prs|trigger=button|text=}{sub-section}{sub-section:putClientProperty-Object_Object_prs|trigger=none|class=sIndent}\{[Object]} key \{[Object]} value {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:putClientProperty-Object_Object_ret|trigger=button|text=}{sub-section}{sub-section:putClientProperty-Object_Object_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putClientProperty-Object_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:putClientProperty-Object_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientProperty-Object_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:putClientProperty-Object_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putClientProperty-Object_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:putClientProperty-Object_Object_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;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}setAccelerator{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setAccelerator_des|trigger=button|text=}{sub-section}{sub-section:setAccelerator_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:setAccelerator_snc|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{sub-section}{sub-section:setAccelerator_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAccelerator_see|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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=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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setBackgroundColor_des|trigger=button|text=}{sub-section}{sub-section:setBackgroundColor_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:setBackgroundColor_snc|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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=setForegroundColor|class=node}{tr:id=name}{td}h6.setForegroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setForegroundColor{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setForegroundColor_des|trigger=button|text=}{sub-section}{sub-section:setForegroundColor_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:setForegroundColor_snc|trigger=button|text=}{sub-section}{sub-section:setForegroundColor_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:setForegroundColor_prs|trigger=button|text=}{sub-section}{sub-section:setForegroundColor_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setForegroundColor_ret|trigger=button|text=}{sub-section}{sub-section:setForegroundColor_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setForegroundColor_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setForegroundColor_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setForegroundColor_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setForegroundColor_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setForegroundColor_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setForegroundColor_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("menucode: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=setIcon|class=node}{tr:id=name}{td}h6.setIcon{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}setIcon{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setIcon_des|trigger=button|text=}{sub-section}{sub-section:setIcon_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:setIcon_snc|trigger=button|text=}{sub-section}{sub-section:setIcon_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:setIcon_prs|trigger=button|text=}{sub-section}{sub-section:setIcon_prs|trigger=none|class=sIndent}{sub-section 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{trtbody:id=retsetForegroundColor}{td}*Returns*\\{sub-section:setIcon_ret|trigger=button|text=}{sub-section}{sub-section:setIcon_ret|trigger=none|class=sIndent}[MenuItem]{sub-sectiontr:id=name}{td}h6.setForegroundColor{trtd}{builder-show:permission=edittr}{tr:id=seesig}{td}*Also see*\\{sub-section:setIcon_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setIcon_see|trigger=none}{sub-section}{div{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setForegroundColor{span}{span}\(){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:setIcon_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setIcon_link|trigger=none}{sub-section}void{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setIcon_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setIcon_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 accelerator for the menu entry entry.setAccelerator("ctrl alt Y"); // setalso andefine icon entry.setIcon("media:///yourimage.gif"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setMethod-Function|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){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setMethod-Function_des|trigger=button|text=}{sub-section}{sub-section:setMethod-Function_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:setMethod-Function_snc|trigger=button|text=}{sub-section}{sub-section:setMethod-Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setMethod-Function_prs|trigger=button|text=}{sub-section}{sub-section:setMethod-Function_prs|trigger=none|class=sIndent}\{[Function]} method {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setMethod-Function_ret|trigger=button|text=}{sub-section}{sub-section:setMethod-Function_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setMethod-Function_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setMethod-Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setMethod-Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setMethod-Function_link|trigger=none}{sub-section}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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setIcon}{tr:id=name}{td}h6.setIcon{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[MenuItem]{span}{span:style=font-weight: bold;}setIcon{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[MenuItem]{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setMethod-Function_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setMethod-Function_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=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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setMethod-Function_ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:setMethod-Function_ObjectArray_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:setMethod-Function_ObjectArray_snc|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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|trigger=button|text=}{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-Function_ObjectArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setMethod-Function_ObjectArray_sam|trigger=none\\{div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setMethod-Function}{tr:id=name}{td}h6.setMethod{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[MenuItem]{span}{span:style=font-weight: bold;}setMethod{span}{span}\(method){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} method {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[MenuItem]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setMethod-Function_ObjectArray}{tr:id=name}{td}h6.setMethod{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[MenuItem]{span}{span:style=font-weight: bold;}setMethod{span}{span}\(method, arguments){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} method \{[Object]\[]} arguments {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[MenuItem]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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=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;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setMnemonic_des|trigger=button|text=}{sub-section}{sub-section:setMnemonic_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:setMnemonic_snc|trigger=button|text=}{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|trigger=button|text=}{sub-section}{sub-section:setMnemonic_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setMnemonic_ret|trigger=button|text=}{sub-section}{sub-section:setMnemonic_ret|trigger=none|class=sIndent}[MenuItem]{sub-section 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-show:permission=edittbody}{trtbody:id=see}{td}*Also see*\\{sub-section:setMnemonic_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_see|trigger=none}{sub-section}{div}tr:id=name}{td}h6.setMnemonic{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksig}{td}*External links*\\{sub-section:setMnemonic_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_link|trigger=none}{sub-section}{div{span:style=margin-right: 5px;}[MenuItem]{span}{span:style=font-weight: bold;}setMnemonic{span}{span}\(){span}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:setMnemonic_sam|trigger=button|text=}{sub-section}div:class=sIndent}[MenuItem]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{sub-section:setMnemonic_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=setVisible-Boolean|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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setVisible-Boolean_des|trigger=button|text=}{sub-section}{sub-section:setVisible-Boolean_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:setVisible-Boolean_snc|trigger=button|text=}{sub-section}{sub-section:setVisible-Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{trtbody:id=prs}{td}*Parameters*\\{sub-section:setVisible-Boolean_prs|trigger=button|text=}{sub-section}{sub-section:setVisible-Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} visible {sub-section}}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=retsig}{td}*Returns*\\{sub-section:setVisible-Boolean_ret|trigger=button|text=}{sub-section}{sub-section:setVisible-Boolean_ret|trigger=none|class=sIndent}[MenuItem]{sub-section{span:style=margin-right: 5px;}[MenuItem]{span}{span:style=font-weight: bold;}setVisible{span}{span}\(visible){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:setVisible-Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setVisible-Boolean_see|trigger=none}{sub-section}:class=sIndent}\{[Boolean]} visible {div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:setVisible-Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setVisible-Boolean_link|trigger=none}{sub-section}[MenuItem]{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setVisible-Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setVisible-Boolean_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_one = menu.addMenuItem("an entry", feedback); // add a checkbox var entry_two = menu.addCheckBox("another entry", feedback); // add a radiobutton var entry_three = menu.addRadioButton("yet another entry", feedback); // hide the menu item entry_one.setVisible(false); // make sure the checkbox is visible entry_two.setVisible(true); // hide the radiobutton entry_three.setVisible(false); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |
Overview
Content Tools
Activity