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:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\() Add a checkbox.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(index) Add a checkbox at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(name) Add a checkbox with given name.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(name, feedback_item) Add a checkbox at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(name, feedback_item, icon) Add a checkbox at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(name, feedback_item, icon, mnemonic) Add a checkbox at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(name, feedback_item, icon, mnemonic, enabled) Add a checkbox at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(name, feedback_item, icon, mnemonic, enabled, align) Add a checkbox at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[Menu]{td}{td}[#addMenu]\() Add a submenu at the end.{td}{tr}{tbody}{tbody}{tr}{td}[Menu]{td}{td}[#addMenu]\(index) Add a submenu at the selected index (starting at 0).{td}{tr}{tbody}{tbody}{tr}{td}[Menu]{td}{td}[#addMenu]\(name) Add a submenu with given name.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\() Add a menu item.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(index) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(name) Add a menu item with given name.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(name, feedback_item) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(name, feedback_item, icon) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(name, feedback_item, icon, mnemonic) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(name, feedback_item, icon, mnemonic, enabled) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(name, feedback_item, icon, mnemonic, enabled, align) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\() Add a radio button.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(index) Add a radiobutton at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(name) Add a radio button with given name.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(name, feedback_item) Add a radiobutton at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(name, feedback_item, icon) Add a radiobutton at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(name, feedback_item, icon, mnemonic) Add a radiobutton at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(name, feedback_item, icon, mnemonic, enabled) Add a radiobutton at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(name, feedback_item, icon, mnemonic, enabled, align) Add a radiobutton at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addRadioGroup]\() Add a radiogroup for radiobuttons.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addSeparator]\() Add the separator at the selected index (starting at 0) or at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addSeparator]\(index) Add the separator at the selected index (starting at 0) or at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[CheckBox]{td}{td}[#getCheckBox]\(index) Get the checkbox at the selected index (starting at 0).{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getClientProperty]\(key) Gets the specified client property for the element based on a key.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#getItem]\(index) Get the item at the selected index (starting at 0).{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getItemCount]\() Get the number of items in the menu.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getItemIndexByText]\(text) Retrieve the index of the item by text.{td}{tr}{tbody}{tbody}{tr}{td}[Menu]{td}{td}[#getMenu]\(index) Get the submenu at the selected index (starting at 0).{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#getRadioButton]\(index) Get the radiobutton at the selected index (starting at 0).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#putClientProperty]\(key, value) Sets the value for the specified element client property key.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeAllItems]\() Remove all items from the menu.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeItem]\(index) Remove the item(s) at the selected index/indices.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#show]\() Show the popup at the mouse coordinates (Smart client only).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#show]\(component) Show the popup above the specified element.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#show]\(component, x, y) Show the popup above the specified element, adding x an y values relative to the element.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#show]\(x, y) Show the popup at x an y coordinates.{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=addCheckBox|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox_des|trigger=none|class=sIndent}AddReplace awith checkbox.description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox_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:addCheckBox_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox-Number|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox-Number_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox-Number_des|trigger=none|class=sIndent}AddReplace a checkbox at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-Number_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-Number_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- the index at which to add the checkbox {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-Number_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox-Number_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-Number_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox-String|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox-String_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_des|trigger=none|class=sIndent}Add aReplace checkbox with given name.description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-String_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox-String_Function|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(name, feedback_item){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox-String_Function_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_des|trigger=none|class=sIndent}AddReplace a checkbox at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_Function_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-String_Function_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_Function_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox-String_Function_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-String_Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Function_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox-String_Function_Object|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox-String_Function_Object_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_des|trigger=none|class=sIndent}AddReplace a checkbox at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_Function_Object_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-String_Function_Object_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the checkbox icon (can be an image URL or the image content byte array) {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_Function_Object_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox-String_Function_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-String_Function_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Function_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox-String_Function_Object_String|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox-String_Function_Object_String_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_des|trigger=none|class=sIndent}AddReplace a checkbox at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_Function_Object_String_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-String_Function_Object_String_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the checkbox icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the checkbox mnemonic {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_Function_Object_String_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox-String_Function_Object_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-String_Function_Object_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Function_Object_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox-String_Function_Object_String_Boolean|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic, enabled){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox-String_Function_Object_String_Boolean_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_des|trigger=none|class=sIndent}AddReplace a checkbox at the selected index (starting at 0) or at the end.{sub-sectionwith description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the checkbox icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the checkbox mnemonic \{[Boolean]} enabled -- the enabled state of the checkbox {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox-String_Function_Object_String_Boolean_Number|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic, enabled, align){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_des|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_des|trigger=none|class=sIndent}AddReplace a checkbox at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_snc|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_prs|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the checkbox icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the checkbox mnemonic \{[Boolean]} enabled -- the enabled state of the checkbox \{[Number]} align -- the alignment type {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_ret|trigger=button|text=}{sub-section}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Function_Object_String_Boolean_Number_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(); // when you don't define an index the checkbox will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addCheckBox("checkbox", feedback_checkbox); // add a checkbox with an icon menu.addCheckBox("checkbox with icon", feedback_checkbox, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addCheckBox("checkbox with icon", feedback_checkbox, pic_bytes); // add a checkbox with a mnemonic menu.addCheckBox("checkbox with mnemonic", feedback_checkbox, "media:///yourimage.gif", "c"); // add a disabled checkbox menu.addCheckBox("checkbox disabled", feedback_checkbox, "media:///yourimage.gif", "d", false); // add a checkbox with text aligned to the right menu.addCheckBox("align right", feedback_checkbox, null, null, true, MenuItem.ALIGN_RIGHT); // add a checkbox at a given index (checkbox properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var chk = menu.addCheckBox(2); chk.text = "checkbox at index"; chk.setMethod(feedback_checkbox); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenu|class=node}{tr:id=name}{td}h6.addMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenu{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenu_des|trigger=button|text=}{sub-section}{sub-section:addMenu_des|trigger=none|class=sIndent}AddReplace a submenu at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenu_snc|trigger=button|text=}{sub-section}{sub-section:addMenu_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:addMenu_prs|trigger=button|text=}{sub-section}{sub-section:addMenu_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addMenu_ret|trigger=button|text=}{sub-section}{sub-section:addMenu_ret|trigger=none|class=sIndent}[Menu] -- the submenu{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenu_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenu_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenu_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu_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 first submenu var submenu1 = menu.addMenu("submenu 1"); submenu1.addMenuItem("sub item 1 - 1", feedback_item); // add a submenu as child of the first submenu var submenu1_2 = submenu1.addMenu("submenu 1 - 2"); submenu1_2.addMenuItem("sub item 1 - 2 - 1", feedback_item); // add another submenu as a child of the first submenu var submenu1_3 = submenu1.addMenu("submenu 1 - 3"); submenu1_3.addMenuItem("sub item 1 - 3 - 1", feedback_item); // add a submenu to the second submenu of the first submenu var submenu1_3_2 = submenu1_2.addMenu("submenu 1 - 2 - 2"); submenu1_3_2.addMenuItem("sub item 1 - 2 - 2 - 1", feedback_item); // add a submenu directly to the menu, at the first position var submenu0 = menu.addMenu(0); submenu0.text = "submenu 0"; submenu0.addMenuItem("sub item 0 - 1", feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenu-Number|class=node}{tr:id=name}{td}h6.addMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenu{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenu-Number_des|trigger=button|text=}{sub-section}{sub-section:addMenu-Number_des|trigger=none|class=sIndent}AddReplace a submenu at the selected index (starting at 0).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenu-Number_snc|trigger=button|text=}{sub-section}{sub-section:addMenu-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenu-Number_prs|trigger=button|text=}{sub-section}{sub-section:addMenu-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- the index at which to add the submenu {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenu-Number_ret|trigger=button|text=}{sub-section}{sub-section:addMenu-Number_ret|trigger=none|class=sIndent}[Menu] -- the submenu{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenu-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenu-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenu-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu-Number_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 first submenu var submenu1 = menu.addMenu("submenu 1"); submenu1.addMenuItem("sub item 1 - 1", feedback_item); // add a submenu as child of the first submenu var submenu1_2 = submenu1.addMenu("submenu 1 - 2"); submenu1_2.addMenuItem("sub item 1 - 2 - 1", feedback_item); // add another submenu as a child of the first submenu var submenu1_3 = submenu1.addMenu("submenu 1 - 3"); submenu1_3.addMenuItem("sub item 1 - 3 - 1", feedback_item); // add a submenu to the second submenu of the first submenu var submenu1_3_2 = submenu1_2.addMenu("submenu 1 - 2 - 2"); submenu1_3_2.addMenuItem("sub item 1 - 2 - 2 - 1", feedback_item); // add a submenu directly to the menu, at the first position var submenu0 = menu.addMenu(0); submenu0.text = "submenu 0"; submenu0.addMenuItem("sub item 0 - 1", feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenu-String|class=node}{tr:id=name}{td}h6.addMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenu{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenu-String_des|trigger=button|text=}{sub-section}{sub-section:addMenu-String_des|trigger=none|class=sIndent}Add aReplace submenu with given name.description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenu-String_snc|trigger=button|text=}{sub-section}{sub-section:addMenu-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenu-String_prs|trigger=button|text=}{sub-section}{sub-section:addMenu-String_prs|trigger=none|class=sIndent}\{[String]} name -- the text of the submenu; this can be also html if enclosed between html tags {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenu-String_ret|trigger=button|text=}{sub-section}{sub-section:addMenu-String_ret|trigger=none|class=sIndent}[Menu] -- the submenu{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenu-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenu-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenu-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenu-String_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 first submenu var submenu1 = menu.addMenu("submenu 1"); submenu1.addMenuItem("sub item 1 - 1", feedback_item); // add a submenu as child of the first submenu var submenu1_2 = submenu1.addMenu("submenu 1 - 2"); submenu1_2.addMenuItem("sub item 1 - 2 - 1", feedback_item); // add another submenu as a child of the first submenu var submenu1_3 = submenu1.addMenu("submenu 1 - 3"); submenu1_3.addMenuItem("sub item 1 - 3 - 1", feedback_item); // add a submenu to the second submenu of the first submenu var submenu1_3_2 = submenu1_2.addMenu("submenu 1 - 2 - 2"); submenu1_3_2.addMenuItem("sub item 1 - 2 - 2 - 1", feedback_item); // add a submenu directly to the menu, at the first position var submenu0 = menu.addMenu(0); submenu0.text = "submenu 0"; submenu0.addMenuItem("sub item 0 - 1", feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem_des|trigger=none|class=sIndent}AddReplace a menu item.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem_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:addMenuItem_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem-Number|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem-Number_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem-Number_des|trigger=none|class=sIndent}AddReplace a menu item at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-Number_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-Number_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- the index at which to add the menu item {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-Number_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem-Number_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-Number_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem-String|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem-String_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_des|trigger=none|class=sIndent}AddReplace a menu item with given name.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-String_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem-String_Function|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(name, feedback_item){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem-String_Function_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_des|trigger=none|class=sIndent}AddReplace a menu item at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_Function_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-String_Function_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_Function_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem-String_Function_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-String_Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Function_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem-String_Function_Object|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem-String_Function_Object_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_des|trigger=none|class=sIndent}AddReplace a menu item at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_Function_Object_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-String_Function_Object_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the menu item icon (can be an image URL or the image content byte array) {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_Function_Object_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem-String_Function_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-String_Function_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Function_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem-String_Function_Object_String|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem-String_Function_Object_String_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_des|trigger=none|class=sIndent}AddReplace a menu item at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_Function_Object_String_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-String_Function_Object_String_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the menu item icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the menu item mnemonic {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_Function_Object_String_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem-String_Function_Object_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-String_Function_Object_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Function_Object_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem-String_Function_Object_String_Boolean|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic, enabled){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem-String_Function_Object_String_Boolean_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_des|trigger=none|class=sIndent}AddReplace a menu item at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the menu item icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the menu item mnemonic \{[Boolean]} enabled -- the enabled state of the menu item {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addMenuItem-String_Function_Object_String_Boolean_Number|class=node}{tr:id=name}{td}h6.addMenuItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenuItem{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic, enabled, align){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_des|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_des|trigger=none|class=sIndent}AddReplace a menu item at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_snc|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_prs|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the menu item icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the menu item mnemonic \{[Boolean]} enabled -- the enabled state of the menu item \{[Number]} align -- the alignment type {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_ret|trigger=button|text=}{sub-section}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_ret|trigger=none|class=sIndent}[MenuItem] -- menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Function_Object_String_Boolean_Number_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(); // when you don't define an index the item will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addMenuItem("item", feedback_item); // add an item with an icon menu.addMenuItem("item with icon", feedback_item, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addMenuItem("item with icon", feedback_item, pic_bytes); // add an item with a mnemonic menu.addMenuItem("item with mnemonic", feedback_item, "media:///yourimage.gif", "i"); // add a disabled item menu.addMenuItem("disabled item", feedback_item, "media:///yourimage.gif", "d", false); // add an item with text aligned to the right menu.addMenuItem("align right", feedback_item, null, null, true, SM_ALIGNMENT.RIGHT); // add an item at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var item = menu.addMenuItem(2); item.text = "item at index"; item.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton_des|trigger=none|class=sIndent}AddReplace a radio button.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton_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:addRadioButton_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-Number|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton-Number_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton-Number_des|trigger=none|class=sIndent}AddReplace a radiobutton at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-Number_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-Number_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- the index at which to add the radio button {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-Number_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton-Number_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-Number_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton-String_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_des|trigger=none|class=sIndent}Add a radio button Replace with given name.description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-String_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text; this can be also html if enclosed between html tags {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Function|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(name, feedback_item){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton-String_Function_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_des|trigger=none|class=sIndent}AddReplace a radiobutton at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Function_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-String_Function_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Function_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-String_Function_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-String_Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Function_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Function_Object|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton-String_Function_Object_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_des|trigger=none|class=sIndent}AddReplace a radiobutton at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Function_Object_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-String_Function_Object_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the radio button icon (can be an image URL or the image content byte array) {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Function_Object_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-String_Function_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-String_Function_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Function_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Function_Object_String|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton-String_Function_Object_String_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_des|trigger=none|class=sIndent}AddReplace a radiobutton at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Function_Object_String_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-String_Function_Object_String_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the radio button icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the radio button mnemonic {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Function_Object_String_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-String_Function_Object_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-String_Function_Object_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Function_Object_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Function_Object_String_Boolean|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic, enabled){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton-String_Function_Object_String_Boolean_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_des|trigger=none|class=sIndent}AddReplace a radiobutton at the selected index (starting at 0) or at the end.{subwith description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the radio button icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the radio button mnemonic \{[Boolean]} enabled -- the enabled state of radio button {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Function_Object_String_Boolean_Number|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic, enabled, align){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_des|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_des|trigger=none|class=sIndent}AddReplace a radiobutton at the selected index (starting at 0) or at the end.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_snc|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_prs|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text; this can be also html if enclosed between html tags \{[Function]} feedback_item -- the feedback function \{[Object]} icon -- the radio button icon (can be an image URL or the image content byte array) \{[String]} mnemonic -- the radio button mnemonic \{[Boolean]} enabled -- the enabled state of radio button \{[Number]} align -- the alignment type {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_ret|trigger=button|text=}{sub-section}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_String_Boolean_Number_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioGroup|class=node}{tr:id=name}{td}h6.addRadioGroup{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioGroup{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRadioGroup_des|trigger=button|text=}{sub-section}{sub-section:addRadioGroup_des|trigger=none|class=sIndent}AddReplace a radiogroup for radiobuttons. A radiogroup groups together all radiobuttons that are added after the group is added. From all radiobuttons that belong to the same radiogroup only one can be checked at a time. If no radiogroup is added, one is created automatically when the first radiobutton is added.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioGroup_snc|trigger=button|text=}{sub-section}{sub-section:addRadioGroup_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:addRadioGroup_prs|trigger=button|text=}{sub-section}{sub-section:addRadioGroup_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioGroup_ret|trigger=button|text=}{sub-section}{sub-section:addRadioGroup_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioGroup_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioGroup_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioGroup_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioGroup_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioGroup_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRadioGroup_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(); // when you don't define an index the radiobutton will be added at the last position // this is what you usually do to build a new menu // minimum settings are the text and method // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end menu.addRadioButton("radio", feedback_radiobutton); // add a radiobutton with an icon menu.addRadioButton("radio with icon", feedback_radiobutton, "media:///yourimage.gif"); //var pic_bytes = plugins.file.readFile("/path/to/image.jpg"); //menu.addRadioButton("radio with icon", feedback_radiobutton, pic_bytes); // add a new radiobutton group // a group will 'bind' all added radiobuttons after the group together // as a result checking one item will uncheck the other // if no group is added, a group is created automatically when the first radiobutton is added to the menu // so in this case we will have two groups, one with the radiobuttons added until now and one with the ones added from now on menu.addRadioGroup(); // add a radiobutton with a mnemonic menu.addRadioButton("radio with mnemonic", feedback_radiobutton, "media:///yourimage.gif", "i"); // add a disabled radiobutton menu.addRadioButton("disabled radio", feedback_radiobutton, "media:///yourimage.gif", "d", false); // add a radiobutton with text aligned to the right menu.addRadioButton("align right", feedback_radiobutton, null, null, true, SM_ALIGNMENT.RIGHT); // add a radiobutton at a given index (item properties must be configured after creation) // indexes start at 0 (zero) so index 2 is in fact position 3 var rd = menu.addRadioButton(2); rd.text = "radio at index"; rd.setMethod(feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addSeparator|class=node}{tr:id=name}{td}h6.addSeparator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addSeparator{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addSeparator_des|trigger=button|text=}{sub-section}{sub-section:addSeparator_des|trigger=none|class=sIndent}AddReplace the separator at the selected index (starting at 0) or at the end (empty).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addSeparator_snc|trigger=button|text=}{sub-section}{sub-section:addSeparator_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:addSeparator_prs|trigger=button|text=}{sub-section}{sub-section:addSeparator_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addSeparator_ret|trigger=button|text=}{sub-section}{sub-section:addSeparator_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addSeparator_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addSeparator_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addSeparator_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addSeparator_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addSeparator_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addSeparator_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 an item and a checkbox menu.addMenuItem("item", feedback_item); menu.addCheckBox("checkbox", feedback_checkbox); // add a separator menu.addSeparator(); // add a radiobutton. it will be separated from the rest of the control by the separator menu.addRadioButton("radio", feedback_radiobutton); // add another separator between the item and the checkbox menu.addSeparator(1); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addSeparator-Number|class=node}{tr:id=name}{td}h6.addSeparator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addSeparator{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addSeparator-Number_des|trigger=button|text=}{sub-section}{sub-section:addSeparator-Number_des|trigger=none|class=sIndent}Add the separator at the selected index (starting at 0) or at the end (empty).Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addSeparator-Number_snc|trigger=button|text=}{sub-section}{sub-section:addSeparator-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addSeparator-Number_prs|trigger=button|text=}{sub-section}{sub-section:addSeparator-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- the index at which to add the separator {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addSeparator-Number_ret|trigger=button|text=}{sub-section}{sub-section:addSeparator-Number_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addSeparator-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addSeparator-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addSeparator-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addSeparator-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addSeparator-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addSeparator-Number_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 an item and a checkbox menu.addMenuItem("item", feedback_item); menu.addCheckBox("checkbox", feedback_checkbox); // add a separator menu.addSeparator(); // add a radiobutton. it will be separated from the rest of the control by the separator menu.addRadioButton("radio", feedback_radiobutton); // add another separator between the item and the checkbox menu.addSeparator(1); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCheckBox|class=node}{tr:id=name}{td}h6.getCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBox]{span}{span:id=iets|style=float: left; font-weight: bold;}getCheckBox{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getCheckBox_des|trigger=button|text=}{sub-section}{sub-section:getCheckBox_des|trigger=none|class=sIndent}GetReplace the checkbox at the selected index (starting at 0).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getCheckBox_snc|trigger=button|text=}{sub-section}{sub-section:getCheckBox_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getCheckBox_prs|trigger=button|text=}{sub-section}{sub-section:getCheckBox_prs|trigger=none|class=sIndent}\{[Number]} index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getCheckBox_ret|trigger=button|text=}{sub-section}{sub-section:getCheckBox_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getCheckBox_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCheckBox_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getCheckBox_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCheckBox_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getCheckBox_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCheckBox_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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a menu item, with a separator before it menu.addSeparator(); menu.addMenuItem("item", feedback_item); // add a checkbox, with a separator before it menu.addSeparator(); menu.addCheckBox("check", feedback_checkbox); // add a submenu with an item under it var submenu = menu.addMenu("submenu"); submenu.addMenuItem("subitem", feedback_item); // depending on some state, update the entries in the menu var some_state = true; if (some_state) { // select the first radiobutton menu.getRadioButton(0).selected = true; } else { // select the first radiobutton menu.getRadioButton(1).selected = true; } // enable/disable the menu item // remember to include the separators also when counting the index menu.getItem(3).enabled = !some_state; // select/unselect the checkbox // remember to include the separators also when counting the index menu.getCheckBox(5).selected = some_state; // change the text of the submenu and its item application.output(menu.getItemCount()); if (some_state) { menu.getMenu(6).text = "some state"; menu.getMenu(6).getItem(0).text = "some text"; } else { menu.getMenu(6).text = "not some state"; menu.getMenu(6).getItem(0).text = "other text"; } {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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getClientProperty_des|trigger=button|text=}{sub-section}{sub-section:getClientProperty_des|trigger=none|class=sIndent}GetsReplace the specified client property for the element based on a key.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientProperty_snc|trigger=button|text=}{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|trigger=button|text=}{sub-section}{sub-section:getClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientProperty_ret|trigger=button|text=}{sub-section}{sub-section:getClientProperty_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientProperty_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientProperty_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientProperty_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_sam|trigger=none}{code:language=javascript} // NOTE: Depending on the operating system, a user interface property name may be available. // 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 an item to the menu menu.addMenuItem("item", feedback_item); // set the tooltip of the menu via client properties // keep the original tooltip in a form or global variable originalTooltip = menu.getClientProperty("ToolTipText"); menu.putClientProperty("ToolTipText", "changed tooltip"); // later restore the original tooltip from the variable //var menubar = plugins.window.getMenuBar(); //var menu = menubar.getMenu(menubar.getMenuCount()-1); //menu.putClientProperty("ToolTipText", originalTooltip); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getItem|class=node}{tr:id=name}{td}h6.getItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}getItem{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getItem_des|trigger=button|text=}{sub-section}{sub-section:getItem_des|trigger=none|class=sIndent}GetReplace the item at the selected index (starting at 0).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItem_snc|trigger=button|text=}{sub-section}{sub-section:getItem_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getItem_prs|trigger=button|text=}{sub-section}{sub-section:getItem_prs|trigger=none|class=sIndent}\{[Number]} index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getItem_ret|trigger=button|text=}{sub-section}{sub-section:getItem_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItem_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItem_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItem_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItem_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItem_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItem_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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a menu item, with a separator before it menu.addSeparator(); menu.addMenuItem("item", feedback_item); // add a checkbox, with a separator before it menu.addSeparator(); menu.addCheckBox("check", feedback_checkbox); // add a submenu with an item under it var submenu = menu.addMenu("submenu"); submenu.addMenuItem("subitem", feedback_item); // depending on some state, update the entries in the menu var some_state = true; if (some_state) { // select the first radiobutton menu.getRadioButton(0).selected = true; } else { // select the first radiobutton menu.getRadioButton(1).selected = true; } // enable/disable the menu item // remember to include the separators also when counting the index menu.getItem(3).enabled = !some_state; // select/unselect the checkbox // remember to include the separators also when counting the index menu.getCheckBox(5).selected = some_state; // change the text of the submenu and its item application.output(menu.getItemCount()); if (some_state) { menu.getMenu(6).text = "some state"; menu.getMenu(6).getItem(0).text = "some text"; } else { menu.getMenu(6).text = "not some state"; menu.getMenu(6).getItem(0).text = "other text"; } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getItemCount|class=node}{tr:id=name}{td}h6.getItemCount{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getItemCount{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getItemCount_des|trigger=button|text=}{sub-section}{sub-section:getItemCount_des|trigger=none|class=sIndent}GetReplace the number of items in the menu.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemCount_snc|trigger=button|text=}{sub-section}{sub-section:getItemCount_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:getItemCount_prs|trigger=button|text=}{sub-section}{sub-section:getItemCount_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getItemCount_ret|trigger=button|text=}{sub-section}{sub-section:getItemCount_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItemCount_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItemCount_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItemCount_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItemCount_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItemCount_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItemCount_sam|trigger=none}{code:language=javascript} // REMARK: indexes start at 0, disabled items, non visible items and seperators are counted also // REMARK: this is especially important when getting items by the index // 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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a checkbox menu.addCheckBox("check", feedback_checkbox); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); // remove the last item menu.removeItem(menu.getItemCount() - 1); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getItemIndexByText|class=node}{tr:id=name}{td}h6.getItemIndexByText{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getItemIndexByText{span}{span:id=iets|style=float: left;}\(text){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getItemIndexByText_des|trigger=button|text=}{sub-section}{sub-section:getItemIndexByText_des|trigger=none|class=sIndent}RetrieveReplace the index of the item by text.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemIndexByText_snc|trigger=button|text=}{sub-section}{sub-section:getItemIndexByText_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getItemIndexByText_prs|trigger=button|text=}{sub-section}{sub-section:getItemIndexByText_prs|trigger=none|class=sIndent}\{[String]} text {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getItemIndexByText_ret|trigger=button|text=}{sub-section}{sub-section:getItemIndexByText_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItemIndexByText_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByText_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItemIndexByText_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByText_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItemIndexByText_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByText_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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a checkbox menu.addCheckBox("check", feedback_checkbox); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); // find the index of the checkbox var idx = menu.getItemIndexByText("check"); // remove the checkbox by its index menu.removeItem(idx); // remove both radiobuttons by their indices menu.removeItem([0, 1]); // remove all remaining entries menu.removeAllItems(); // add back an item menu.addMenuItem("new item", feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMenu|class=node}{tr:id=name}{td}h6.getMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]{span}{span:id=iets|style=float: left; font-weight: bold;}getMenu{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getMenu_des|trigger=button|text=}{sub-section}{sub-section:getMenu_des|trigger=none|class=sIndent}GetReplace the submenu at the selected index (starting at 0).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMenu_snc|trigger=button|text=}{sub-section}{sub-section:getMenu_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getMenu_prs|trigger=button|text=}{sub-section}{sub-section:getMenu_prs|trigger=none|class=sIndent}\{[Number]} index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getMenu_ret|trigger=button|text=}{sub-section}{sub-section:getMenu_ret|trigger=none|class=sIndent}[Menu]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMenu_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMenu_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMenu_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMenu_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMenu_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMenu_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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a menu item, with a separator before it menu.addSeparator(); menu.addMenuItem("item", feedback_item); // add a checkbox, with a separator before it menu.addSeparator(); menu.addCheckBox("check", feedback_checkbox); // add a submenu with an item under it var submenu = menu.addMenu("submenu"); submenu.addMenuItem("subitem", feedback_item); // depending on some state, update the entries in the menu var some_state = true; if (some_state) { // select the first radiobutton menu.getRadioButton(0).selected = true; } else { // select the first radiobutton menu.getRadioButton(1).selected = true; } // enable/disable the menu item // remember to include the separators also when counting the index menu.getItem(3).enabled = !some_state; // select/unselect the checkbox // remember to include the separators also when counting the index menu.getCheckBox(5).selected = some_state; // change the text of the submenu and its item application.output(menu.getItemCount()); if (some_state) { menu.getMenu(6).text = "some state"; menu.getMenu(6).getItem(0).text = "some text"; } else { menu.getMenu(6).text = "not some state"; menu.getMenu(6).getItem(0).text = "other text"; } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRadioButton|class=node}{tr:id=name}{td}h6.getRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}getRadioButton{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getRadioButton_des|trigger=button|text=}{sub-section}{sub-section:getRadioButton_des|trigger=none|class=sIndent}GetReplace the radiobutton at the selected index (starting at 0).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getRadioButton_snc|trigger=button|text=}{sub-section}{sub-section:getRadioButton_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getRadioButton_prs|trigger=button|text=}{sub-section}{sub-section:getRadioButton_prs|trigger=none|class=sIndent}\{[Number]} index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getRadioButton_ret|trigger=button|text=}{sub-section}{sub-section:getRadioButton_ret|trigger=none|class=sIndent}[RadioButton]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getRadioButton_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getRadioButton_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getRadioButton_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getRadioButton_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getRadioButton_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getRadioButton_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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a menu item, with a separator before it menu.addSeparator(); menu.addMenuItem("item", feedback_item); // add a checkbox, with a separator before it menu.addSeparator(); menu.addCheckBox("check", feedback_checkbox); // add a submenu with an item under it var submenu = menu.addMenu("submenu"); submenu.addMenuItem("subitem", feedback_item); // depending on some state, update the entries in the menu var some_state = true; if (some_state) { // select the first radiobutton menu.getRadioButton(0).selected = true; } else { // select the first radiobutton menu.getRadioButton(1).selected = true; } // enable/disable the menu item // remember to include the separators also when counting the index menu.getItem(3).enabled = !some_state; // select/unselect the checkbox // remember to include the separators also when counting the index menu.getCheckBox(5).selected = some_state; // change the text of the submenu and its item application.output(menu.getItemCount()); if (some_state) { menu.getMenu(6).text = "some state"; menu.getMenu(6).getItem(0).text = "some text"; } else { menu.getMenu(6).text = "not some state"; menu.getMenu(6).getItem(0).text = "other text"; } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=putClientProperty|class=node}{tr:id=name}{td}h6.putClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}putClientProperty{span}{span:id=iets|style=float: left;}\(key, value){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:putClientProperty_des|trigger=button|text=}{sub-section}{sub-section:putClientProperty_des|trigger=none|class=sIndent}SetsReplace the value for the specified element client property key.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putClientProperty_snc|trigger=button|text=}{sub-section}{sub-section:putClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:putClientProperty_prs|trigger=button|text=}{sub-section}{sub-section:putClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key \{[Object]} value {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:putClientProperty_ret|trigger=button|text=}{sub-section}{sub-section:putClientProperty_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putClientProperty_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientProperty_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putClientProperty_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_sam|trigger=none}{code:language=javascript} // NOTE: Depending on the operating system, a user interface property name may be available. // 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 an item to the menu menu.addMenuItem("item", feedback_item); // set the tooltip of the menu via client properties // keep the original tooltip in a form or global variable originalTooltip = menu.getClientProperty("ToolTipText"); menu.putClientProperty("ToolTipText", "changed tooltip"); // later restore the original tooltip from the variable //var menubar = plugins.window.getMenuBar(); //var menu = menubar.getMenu(menubar.getMenuCount()-1); //menu.putClientProperty("ToolTipText", originalTooltip); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeAllItems|class=node}{tr:id=name}{td}h6.removeAllItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeAllItems{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:removeAllItems_des|trigger=button|text=}{sub-section}{sub-section:removeAllItems_des|trigger=none|class=sIndent}RemoveReplace all items from the menu.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeAllItems_snc|trigger=button|text=}{sub-section}{sub-section:removeAllItems_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:removeAllItems_prs|trigger=button|text=}{sub-section}{sub-section:removeAllItems_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:removeAllItems_ret|trigger=button|text=}{sub-section}{sub-section:removeAllItems_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeAllItems_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeAllItems_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeAllItems_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeAllItems_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeAllItems_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeAllItems_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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a checkbox menu.addCheckBox("check", feedback_checkbox); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); // find the index of the checkbox var idx = menu.getItemIndexByText("check"); // remove the checkbox by its index menu.removeItem(idx); // remove both radiobuttons by their indices menu.removeItem([0, 1]); // remove all remaining entries menu.removeAllItems(); // add back an item menu.addMenuItem("new item", feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeItem|class=node}{tr:id=name}{td}h6.removeItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeItem{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:removeItem_des|trigger=button|text=}{sub-section}{sub-section:removeItem_des|trigger=none|class=sIndent}RemoveReplace the item(s) at the selected index/indices.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeItem_snc|trigger=button|text=}{sub-section}{sub-section:removeItem_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:removeItem_prs|trigger=button|text=}{sub-section}{sub-section:removeItem_prs|trigger=none|class=sIndent}\{[Object]\[]} index -- array of one or moe indexes corresponding to items to remove {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:removeItem_ret|trigger=button|text=}{sub-section}{sub-section:removeItem_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeItem_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeItem_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeItem_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeItem_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeItem_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeItem_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 two radiobuttons menu.addRadioButton("radio one", feedback_radiobutton); menu.addRadioButton("radio two", feedback_radiobutton); // add a checkbox menu.addCheckBox("check", feedback_checkbox); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); // find the index of the checkbox var idx = menu.getItemIndexByText("check"); // remove the checkbox by its index menu.removeItem(idx); // remove both radiobuttons by their indices menu.removeItem([0, 1]); // remove all remaining entries menu.removeAllItems(); // add back an item menu.addMenuItem("new item", feedback_item); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=show|class=node}{tr:id=name}{td}h6.show{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}show{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:show_des|trigger=button|text=}{sub-section}{sub-section:show_des|trigger=none|class=sIndent}ShowReplace the popup at the mouse coordinates (Smart client only).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show_snc|trigger=button|text=}{sub-section}{sub-section:show_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:show_prs|trigger=button|text=}{sub-section}{sub-section:show_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:show_ret|trigger=button|text=}{sub-section}{sub-section:show_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:show_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:show_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:show_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_sam|trigger=none}{code:language=javascript} // NOTE: usually this code is placed in a handler of an event (e.g. right click on some component) // create a popup menu var menu = plugins.window.createPopupMenu(); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); if (event.getSource()) { // display the popup over the component which is the source of the event menu.show(event.getSource()); // display the popup over the components, at specified coordinates relative to the component //menu.show(event.getSource(), 10, 10); // display the popup at specified coordinates relative to the main window //menu.show(100, 100); } // in Smart client, you can also use show with no parameters, it will show at the mouse coordinates: //menu.show(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=show-RuntimeComponent|class=node}{tr:id=name}{td}h6.show{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}show{span}{span:id=iets|style=float: left;}\(component){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:show-RuntimeComponent_des|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_des|trigger=none|class=sIndent}ShowReplace the popup above the specified element.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show-RuntimeComponent_snc|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:show-RuntimeComponent_prs|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_prs|trigger=none|class=sIndent}\{[RuntimeComponent]} component {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:show-RuntimeComponent_ret|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:show-RuntimeComponent_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-RuntimeComponent_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:show-RuntimeComponent_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-RuntimeComponent_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:show-RuntimeComponent_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-RuntimeComponent_sam|trigger=none}{code:language=javascript} // NOTE: usually this code is placed in a handler of an event (e.g. right click on some component) // create a popup menu var menu = plugins.window.createPopupMenu(); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); if (event.getSource()) { // display the popup over the component which is the source of the event menu.show(event.getSource()); // display the popup over the components, at specified coordinates relative to the component //menu.show(event.getSource(), 10, 10); // display the popup at specified coordinates relative to the main window //menu.show(100, 100); } // in Smart client, you can also use show with no parameters, it will show at the mouse coordinates: //menu.show(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=show-RuntimeComponent_Number_Number|class=node}{tr:id=name}{td}h6.show{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}show{span}{span:id=iets|style=float: left;}\(component, x, y){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:show-RuntimeComponent_Number_Number_des|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_Number_Number_des|trigger=none|class=sIndent}ShowReplace the popup above the specified element, adding x an y values relative to the element.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show-RuntimeComponent_Number_Number_snc|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_Number_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:show-RuntimeComponent_Number_Number_prs|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_Number_Number_prs|trigger=none|class=sIndent}\{[RuntimeComponent]} component \{[Number]} x \{[Number]} y {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:show-RuntimeComponent_Number_Number_ret|trigger=button|text=}{sub-section}{sub-section:show-RuntimeComponent_Number_Number_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:show-RuntimeComponent_Number_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-RuntimeComponent_Number_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:show-RuntimeComponent_Number_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-RuntimeComponent_Number_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:show-RuntimeComponent_Number_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-RuntimeComponent_Number_Number_sam|trigger=none}{code:language=javascript} // NOTE: usually this code is placed in a handler of an event (e.g. right click on some component) // create a popup menu var menu = plugins.window.createPopupMenu(); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); if (event.getSource()) { // display the popup over the component which is the source of the event menu.show(event.getSource()); // display the popup over the components, at specified coordinates relative to the component //menu.show(event.getSource(), 10, 10); // display the popup at specified coordinates relative to the main window //menu.show(100, 100); } // in Smart client, you can also use show with no parameters, it will show at the mouse coordinates: //menu.show(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=show-Number_Number|class=node}{tr:id=name}{td}h6.show{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}show{span}{span:id=iets|style=float: left;}\(x, y){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:show-Number_Number_des|trigger=button|text=}{sub-section}{sub-section:show-Number_Number_des|trigger=none|class=sIndent}ShowReplace the popup at x an y coordinates.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show-Number_Number_snc|trigger=button|text=}{sub-section}{sub-section:show-Number_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:show-Number_Number_prs|trigger=button|text=}{sub-section}{sub-section:show-Number_Number_prs|trigger=none|class=sIndent}\{[Number]} x \{[Number]} y {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:show-Number_Number_ret|trigger=button|text=}{sub-section}{sub-section:show-Number_Number_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:show-Number_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-Number_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:show-Number_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-Number_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:show-Number_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show-Number_Number_sam|trigger=none}{code:language=javascript} // NOTE: usually this code is placed in a handler of an event (e.g. right click on some component) // create a popup menu var menu = plugins.window.createPopupMenu(); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); if (event.getSource()) { // display the popup over the component which is the source of the event menu.show(event.getSource()); // display the popup over the components, at specified coordinates relative to the component //menu.show(event.getSource(), 10, 10); // display the popup at specified coordinates relative to the main window //menu.show(100, 100); } // in Smart client, you can also use show with no parameters, it will show at the mouse coordinates: //menu.show(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |
Overview
Content Tools
Activity