Child pages
  • Popup

Versions Compared

Key

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

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px|width=80px}{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|width=100%}{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}{tr:id=des}{td}{sub-section:addCheckBox_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox_des|trigger=none|class=sIndent}Add a checkbox.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addCheckBox-Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-Number_des|trigger=none|class=sIndent}Add a checkbox at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-Number_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addCheckBox-String_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_des|trigger=none|class=sIndent}Add a checkbox with given name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text
{sub-section}{td; this can be also html if enclosed between html tags
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_ret|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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_ObjectFunction|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}{tr:id=des}{td}{sub-section:addCheckBox-String_ObjectFunction_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_des|trigger=none|class=sIndent}Add a checkbox at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_ObjectFunction_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-String_ObjectFunction_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenu
feedback function
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox-String_ObjectFunction_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox-String_ObjectFunction_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_ObjectFunction_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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 addpic_bytes a checkbox with a mnemonic
menu.addCheckBox("checkbox with mnemonic"= 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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addCheckBox-String_ObjectFunction_Object_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_des|trigger=none|class=sIndent}Add a checkbox at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_ObjectFunction_Object_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe canfeedback be either a method or an array representing a submenu
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_ObjectFunction_Object_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_ObjectFunction_Object_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addCheckBox-String_ObjectFunction_Object_String_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_String_des|trigger=none|class=sIndent}Add a checkbox at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_ObjectFunction_Object_String_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_String_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenufeedback 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_ObjectFunction_Object_String_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_ObjectFunction_Object_String_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_des|trigger=none|class=sIndent}Add a checkbox at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenu
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_ObjectFunction_Object_String_Boolean_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_Number_des|trigger=none|class=sIndent}Add a checkbox at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_Number_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_Number_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenufeedback 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_ObjectFunction_Object_String_Boolean_Number_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_ObjectFunction_Object_String_Boolean_Number_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_ObjectFunction_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 addpic_bytes a checkbox with a mnemonic
menu.addCheckBox("checkbox with mnemonic"= 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}{tr:id=des}{td}{sub-section:addMenu_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenu_des|trigger=none|class=sIndent}Add a submenu at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenu_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addMenu-Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenu-Number_des|trigger=none|class=sIndent}Add a submenu at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenu-Number_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addMenu-String_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenu-String_des|trigger=none|class=sIndent}Add a submenu with given name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenu-String_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addMenuItem_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem_des|trigger=none|class=sIndent}Add a menu item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|text=|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}{tr:id=des}{td}{sub-section:addMenuItem-Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-Number_des|trigger=none|class=sIndent}Add a menu item at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-Number_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addMenuItem-String_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_des|trigger=none|class=sIndent}Add a menu item with given name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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 addpic_bytes an item with a mnemonic
menu.addMenuItem("item with mnemonic"= 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_ObjectFunction|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}{tr:id=des}{td}{sub-section:addMenuItem-String_ObjectFunction_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_des|trigger=none|class=sIndent}Add a menu item at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_ObjectFunction_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem-String_ObjectFunction_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe canfeedback be either a method or an array representing a submenu
function
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_ObjectFunction_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItem-String_ObjectFunction_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_ObjectFunction_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addMenuItem-String_ObjectFunction_Object_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_Object_des|trigger=none|class=sIndent}Add a menu item at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_ObjectFunction_Object_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenufeedback 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_ObjectFunction_Object_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_ObjectFunction_Object_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addMenuItem-String_ObjectFunction_Object_String_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_Object_String_des|trigger=none|class=sIndent}Add a menu item at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_ObjectFunction_Object_String_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_Object_String_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenu
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_ObjectFunction_Object_String_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_ObjectFunction_Object_String_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_des|trigger=none|class=sIndent}Add a menu item at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenufeedback 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_ObjectFunction_Object_String_Boolean_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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 addpic_bytes an item with a mnemonic
menu.addMenuItem("item with mnemonic"= 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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_Number_des|trigger=none|class=sIndent}Add a menu item at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_Number_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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
\{[ObjectFunction]} feedback_item -- thisthe canfeedback be either a method or an array representing a submenu
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_ObjectFunction_Object_String_Boolean_Number_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_ObjectFunction_Object_String_Boolean_Number_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_ObjectFunction_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}{tr:id=des}{td}{sub-section:addRadioButton_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton_des|trigger=none|class=sIndent}Add a radio button.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript}
// add a new menu to 
{code}{builder-show}{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}{tr:id=des}{td}{sub-section:addRadioButton-Number_des|text=|trigger=button}{sub-section}{sub-section:addRadioButton-Number_des|trigger=none|class=sIndent}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-Number_snc|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{sub-section}{div:class=sIndentthe 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}{tr:id=des}{td}{sub-section:addRadioButton-Number_seedes|trigger=nonebutton|text=}{sub-section}{sub-section:addRadioButton-Number_des|trigger=none|class=sIndent}{divAdd a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksnc}{td}*External linksSince*\\{sub-section:addRadioButton-Number_linksnc|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-Number_linksnc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{tr:id=samprs}{td}*SampleParameters*\\{sub-section:addRadioButton-Number_samprs|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-Number_samprs|trigger=none|class=sIndent}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show}{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\{[Number]} index -- the index at which to add the radio button
{sub-section}{td}{tr}{tr:id=desret}{td}*Returns*\\{sub-section:addRadioButton-StringNumber_desret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-StringNumber_desret|trigger=none|class=sIndent}Add[RadioButton] -- a radio button with given name.menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=sncsee}{td}*SinceAlso see*\\{sub-section:addRadioButton-StringNumber_sncsee|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-StringNumber_sncsee|trigger=none|class=sIndent} Replace with version info}{sub-section}{div}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton-String_prs|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_ret|text=|trigger=button}{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=seelink}{td}*AlsoExternal seelinks*\\{sub-section:addRadioButton-StringNumber_seelink|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-StringNumber_seelink|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:addRadioButton-StringNumber_linksam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-StringNumber_linksam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_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){span}{td}{tr}{tr:id=des}{td}{sub-section:addRadioButton-String_Object_des|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_des|trigger=none|class=sIndent}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Object_snc|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_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_Object_prs|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text
\{[Object]} feedback_item -- this can be either a method or an array representing a submenu
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Object_ret|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_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_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_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_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_link|trigger=none}{sub-section}{divcode: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}{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 with given name.{sub-section}{td}{tr}{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}{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}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{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}{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}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{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}{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}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{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=samsee}{td}*SampleAlso see*\\{sub-section:addRadioButton-String_Function_Object_String_samsee|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Function_Object_samString_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{codetr:language=javascript}

{code}{builder-showid=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:classid=lastDetailRowsam}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Object_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}{tr:id=des}{td}{sub-section:addRadioButton-String_Object_Object_des|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_Object_des|trigger=none|class=sIndent}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Object_Object_snc|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_prs|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text
\{[Object]} feedback_item -- this can be either a method or an array representing a submenu
\{[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_Object_Object_ret|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_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_Object_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Object_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show*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_ObjectFunction_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, mnemonicenabled){span}{td}{tr}{tr:id=des}{td}{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_des|trigger=none|class=sIndent}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text; this can be also html if enclosed between html tags
\{[ObjectFunction]} feedback_item -- thisthe can be either a method or an array representing a submenu
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_ObjectFunction_Object_String_Boolean_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_String_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show}{|text=}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbodysIndent}{tbodysub-section:id=addRadioButton-String_ObjectFunction_Object_String_Boolean_sam|classtrigger=nodenone}{trcode:idlanguage=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}{tr:id=des}{td}{sub-section:addRadioButton-String_Object_Object_String_Boolean_des|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_Object_String_Boolean_des|trigger=none|class=sIndent}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_Object_Object_String_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_String_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the radio button text
\{[Object]} feedback_item -- this can be either a method or an array representing a submenu
\{[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_Object_Object_String_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_String_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_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_Object_Object_String_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Object_Object_String_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_String_Boolean_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show}{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_ObjectFunction_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}{tr:id=des}{td}{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_Number_des|trigger=none|class=sIndent}Add a radiobutton at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_Number_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_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
\{[ObjectFunction]} feedback_item -- thisthe canfeedback be either a method or an array representing a submenu
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_ObjectFunction_Object_String_Boolean_Number_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioButton-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_ObjectFunction_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_ObjectFunction_Object_String_Boolean_Number_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_ObjectFunction_Object_String_Boolean_Number_sam|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_ObjectFunction_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}{tr:id=des}{td}{sub-section:addRadioGroup_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addRadioGroup_des|trigger=none|class=sIndent}Add 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.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioGroup_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addSeparator_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:addSeparator_des|trigger=none|class=sIndent}Add the separator at the selected index (starting at 0) or at the end (empty).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addSeparator_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:addSeparator-Number_des|texttrigger=button|triggertext=button}{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).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addSeparator-Number_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:getCheckBox_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:getCheckBox_des|trigger=none|class=sIndent}Get the checkbox at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getCheckBox_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:getClientProperty_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:getClientProperty_des|trigger=none|class=sIndent}Gets the specified client property for the element based on a key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientProperty_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:getClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientProperty_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:getClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientProperty_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:getClientProperty_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientProperty_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientProperty_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientProperty_sam|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:getItem_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:getItem_des|trigger=none|class=sIndent}Get the item at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItem_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:getItemCount_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:getItemCount_des|trigger=none|class=sIndent}Get the number of items in the menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemCount_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:getItemIndexByText_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:getItemIndexByText_des|trigger=none|class=sIndent}Retrieve the index of the item by text.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemIndexByText_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:getMenu_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:getMenu_des|trigger=none|class=sIndent}Get the submenu at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMenu_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:getRadioButton_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:getRadioButton_des|trigger=none|class=sIndent}Get the radiobutton at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getRadioButton_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:putClientProperty_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:putClientProperty_des|trigger=none|class=sIndent}Sets the value for the specified element client property key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putClientProperty_snc|texttrigger=button|triggertext=button}{sub-section}{sub-section:putClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:putClientProperty_prs|texttrigger=button|triggertext=button}{sub-section}{sub-section:putClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key
\{[Object]} value
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:putClientProperty_ret|texttrigger=button|triggertext=button}{sub-section}{sub-section:putClientProperty_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putClientProperty_see|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientProperty_link|texttrigger=button|triggertext=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putClientProperty_sam|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:removeAllItems_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:removeAllItems_des|trigger=none|class=sIndent}Remove all items from the menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeAllItems_snc|text=|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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:removeItem_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:removeItem_des|trigger=none|class=sIndent}Remove the item(s) at the selected index/indices.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeItem_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:show_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:show_des|trigger=none|class=sIndent}Show the popup at the mouse coordinates (Smart client only).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:show-RuntimeComponent_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:show-RuntimeComponent_des|trigger=none|class=sIndent}Show the popup above the specified element.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show-RuntimeComponent_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:show-RuntimeComponent_Number_Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:show-RuntimeComponent_Number_Number_des|trigger=none|class=sIndent}Show the popup above the specified element, adding x an y values relative to the element.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show-RuntimeComponent_Number_Number_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}{tr:id=des}{td}{sub-section:show-Number_Number_des|texttrigger=button|triggertext=button}{sub-section}{sub-section:show-Number_Number_des|trigger=none|class=sIndent}Show the popup at x an y coordinates.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show-Number_Number_snc|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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|texttrigger=button|triggertext=button}{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}