Page History
Wiki Markup |
---|
{hidden} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden} {sub-section:description|text=}{sub-section}\\ {table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(\[name\], \[method\], \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add the Checkbox) 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 add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[MenuCheckBox]{td}{td}[#addMenu#addCheckBox]\(\[name\], \[menu\], \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add the submenuname) 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 add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[MenuItemCheckBox]{td}{td}[#addMenuItem#addCheckBox]\(\[name\], \[method\]feedback_item, \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add the item icon) Add a checkbox at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[RadioButtonCheckBox]{td}{td}[#addRadioButton#addCheckBox]\(\[name\], \[method\]feedback_item, \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add thea Radiobuttoncheckbox at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}void[CheckBox]{td}{td}[#addRadioGroup#addCheckBox]\(name, feedback_item, icon, mnemonic, enabled) Add a Radiogroup forcheckbox at the selected index (starting at 0) or at the Radiobuttonsend.{td}{tr}{tbody}{tbody}{tr}{td}void[CheckBox]{td}{td}[#addSeparator#addCheckBox]\(name, feedback_item, icon, mnemonic, enabled, align) Add thea separatorcheckbox at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[CheckBoxMenu]{td}{td}[#getCheckBox#addMenu]\(index) GetAdd thea Checkboxsubmenu at the selected index (starting at 0)end.{td}{tr}{tbody}{tbody}{tr}{td}[ObjectMenu]{td}{td}[#getClientProperty#addMenu]\(keyindex) GetsAdd thea specifiedsubmenu clientat property for the elementselected basedindex on(starting aat key0).{td}{tr}{tbody}{tbody}{tr}{td}[MenuItemMenu]{td}{td}[#getItem#addMenu]\(indexname) GetAdd thea itemsubmenu atwith the selected index (starting at 0)given name.{td}{tr}{tbody}{tbody}{tr}{td}[NumberMenuItem]{td}{td}[#getItemCount#addMenuItem]\() GetAdd thea number of items in the menumenu item.{td}{tr}{tbody}{tbody}{tr}{td}[NumberMenuItem]{td}{td}[#getItemIndexByText#addMenuItem]\(name) Retrieve the index of the item by textindex) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}[MenuMenuItem]{td}{td}[#getMenu#addMenuItem]\(indexname) GetAdd thea submenumenu atitem thewith selected index (starting at 0)given name.{td}{tr}{tbody}{tbody}{tr}{td}[RadioButtonMenuItem]{td}{td}[#getRadioButton#addMenuItem]\(index) Get the Radiobuttonname, feedback_item) Add a menu item at the selected index (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}void[MenuItem]{td}{td}[#putClientProperty#addMenuItem]\(keyname, feedback_item, valueicon) Add Setsa themenu valueitem forat the specifiedselected elementindex client(starting property keyat 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}void[MenuItem]{td}{td}[#removeAllItems#addMenuItem]\(name, feedback_item, icon, mnemonic) Remove all items from Add a menu item at the selected index (starting at 0) or at the menuend.{td}{tr}{tbody}{tbody}{tr}{td}void[MenuItem]{td}{td}[#removeItem#addMenuItem]\(index 1, \[index 2-n\]) Remove the item(s)name, feedback_item, icon, mnemonic, enabled) Add a menu item at the selected index/indices (starting at 0) or at the end.{td}{tr}{tbody}{tbody}{tr}{td}void[MenuItem]{td}{td}[#show#addMenuItem]\(\[element\], \[x\], \[y\]) Show the popup below the element or add x an y values relative to the elementname, 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}{tabletr}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=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;}\(\[name\], \[method\], \[icon\], \[mnemonic\], \[enabled\], \[align\]){span}{td}{tr}{tr:id=des}{td}{sub-section:addCheckBox_des|text=|trigger=button}{sub-section}{sub-section:addCheckBox_des|trigger=none|class=sIndent}Add the Checkbox{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 add it at the end (empty).{sub-section}{td.{td}{tr}{tbody}{tbody}{tr}{builder-show:permission=edit}{tr:id=snctd}[RadioButton]{td}{td}*Since*\\{sub-section:addCheckBox_snc|text=|trigger=button}{sub-section}{sub-section:addCheckBox_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox_prs|text=|trigger=button}{sub-section}{sub-section:addCheckBox_prs|trigger=none|class=sIndent}\[name\] \[method\] \[icon\] \[mnemonic\] \[enabled\] \[align\] {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addCheckBox_ret|text=|trigger=button}{sub-section}{sub-section:addCheckBox_ret|trigger=none|class=sIndent}[CheckBox]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addCheckBox_see|text=|trigger=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|text=|trigger=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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{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:id=addMenu|class=node}{tr:id=name}{td}h6.addMenuvoid{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\], \[menu\], \[icon\], \[mnemonic\], \[enabled\], \[align\]){span}{td}{tr}{tr:id=des}{td}{sub-section:addMenu_des|text=|trigger=button}{sub-section}{sub-section:addMenu_des|trigger=none|class=sIndent}Add the submenu at the selected index (starting at 0) or add it at the end (empty).{sub-section}[#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}{builder-show:permission=edittbody}{tbody}{tr:id=snc}{td}*Since*\\{sub-section:addMenu_snc|text=|trigger=button}{sub-section}{sub-section:addMenu_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenu_prs|text=|trigger=button}{sub-section}{sub-section:addMenu_prs|trigger=none|class=sIndent}\[name\] \[menu\] \[icon\] \[mnemonic\] \[enabled\] \[align\] {sub-sectionvoid{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: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=retdes}{td}*Returns*\\{sub-section:addMenuaddCheckBox_retdes|text=|trigger=button}{sub-section}{sub-section:addMenuaddCheckBox_retdes|trigger=none|class=sIndent}[Menu]Add a checkbox.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seesnc}{td}*Also seeSince*\\{sub-section:addMenuaddCheckBox_seesnc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuaddCheckBox_seesnc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:addMenuaddCheckBox_linkprs|text=|trigger=button}{sub-section}{div:class=sIndent}sub-section:addCheckBox_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addMenu_linkaddCheckBox_ret|text=|trigger=nonebutton}{sub-section}{divsub-section:addCheckBox_ret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=samsee}{td}*SampleAlso see*\\{sub-section:addMenuaddCheckBox_samsee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuaddCheckBox_samsee|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } {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;}\(\[name\], \[method\], \[icon\], \[mnemonic\], \[enabled\], \[align\]){span}{td}{tr}{tr:id=des}{td}{sub-section:addMenuItem_des|text=|trigger=button}{sub-section}{sub-section:addMenuItem_des|trigger=none|class=sIndent}Add the item at the selected index (starting at 0) or add it at the end (empty).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenuItem_snc}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addCheckBox_link|text=|trigger=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|text=|trigger=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"); // 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|text=|trigger=button}{sub-section}{sub-section:addMenuItemaddCheckBox-Number_sncdes|trigger=none|class=sIndent} Replace with version infoAdd a checkbox at the selected index (starting at 0) or at the end.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:addMenuItemaddCheckBox-Number_prssnc|text=|trigger=button}{sub-section}{sub-section:addMenuItemaddCheckBox-Number_prssnc|trigger=none|class=sIndent}\[name\] \[method\] \[icon\] \[mnemonic\] \[enabled\] \[align\] Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addCheckBox-Number_prs|text=|trigger=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:addMenuItemaddCheckBox-Number_ret|text=|trigger=button}{sub-section}{sub-section:addMenuItemaddCheckBox-Number_ret|trigger=none|class=sIndent}[MenuItemCheckBox] -- checkbox{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenuItemaddCheckBox-Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItemaddCheckBox-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenuItemaddCheckBox-Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItemaddCheckBox-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItemaddCheckBox-Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItemaddCheckBox-Number_sam|trigger=none}{code:language=javascript} // add a new menu to the menubar var popupmenumenubar = plugins.window.createPopupMenugetMenuBar() ; var menuitem1menu = popupmenumenubar.addMenuItemaddMenu('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } {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;}\(\[name\], \[method\], \[icon\], \[mnemonic\], \[enabled\], \[align\]){span}{td}{tr}{tr:id=des}{td}{sub-section:addRadioButton_des|text=|trigger=button}{sub-section}{sub-section:addRadioButton_des|trigger=none|class=sIndent}Add the Radiobutton at the selected index (starting at 0) or add it at the end (empty).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioButton_snc|text=|trigger=button}{sub-section}{sub-section:addRadioButton_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRadioButton_prs; 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"); // 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|text=|trigger=button}{sub-section}{sub-section:addRadioButtonaddCheckBox-String_prsdes|trigger=none|class=sIndent}\[name\] \[method\] \[icon\] \[mnemonic\] \[enabled\] \[align\] Add a checkbox with given name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=retsnc}{td}*ReturnsSince*\\{sub-section:addRadioButtonaddCheckBox-String_retsnc|text=|trigger=button}{sub-section}{sub-section:addRadioButtonaddCheckBox-String_retsnc|trigger=none|class=sIndent}[RadioButton] Replace with version info{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:addRadioButtonaddCheckBox-String_seeprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButtonaddCheckBox-String_seeprs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:addRadioButtonaddCheckBox-String_linkret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButtonaddCheckBox-String_linkret|trigger=none|class=sIndent}[CheckBox] -- checkbox{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=samsee}{td}*Also see*\\{sub-section:addCheckBox-String_see|text=|trigger=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|text=|trigger=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:addRadioButtonaddCheckBox-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButtonaddCheckBox-String_sam|trigger=none}{code:language=javascript} var// popupmenuadd = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } {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|text=|trigger=button}{sub-section}{sub-section:addRadioGroup_des|trigger=none|class=sIndent}Add a Radiogroup for the Radiobuttons.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRadioGroup_snc|text=|trigger=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|text=|trigger=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|text=|trigger=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_seea 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"); // 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_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){span}{td}{tr}{tr:id=des}{td}{sub-section:addCheckBox-String_Object_des|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioGroup_seeaddCheckBox-String_Object_des|trigger=none|class=sIndent}Add a checkbox at the selected index (starting at 0) or at the end.{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksnc}{td}*External linksSince*\\{sub-section:addRadioGroup_linkaddCheckBox-String_Object_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioGroup_linkaddCheckBox-String_Object_snc|trigger=none}|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{tr:id=samprs}{td}*SampleParameters*\\{sub-section:addRadioGroup_samaddCheckBox-String_Object_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioGroup_samaddCheckBox-String_Object_prs|trigger=none|class=sIndent}{code:language=javascript\{[String]} varname popupmenu-- = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } {codethe checkbox 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:addCheckBox-String_Object_ret|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_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_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{trbuilder-show:classpermission=lastDetailRowedit}{tdtr:id=link}{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*External links*\\{sub-section:addCheckBox-String_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=dessam}{td}*Sample*\\{sub-section:addSeparator_desaddCheckBox-String_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addSeparator_desaddCheckBox-String_Object_sam|trigger=none|class=sIndent}Add the separator at the selected index (starting at 0) or add it at the end (empty).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addSeparator_snc|text=|trigger=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}{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"); // 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_Object_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_Object_Object_des|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_snc|text=|trigger=button}{sub-section}{sub-section:addCheckBox-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:addCheckBox-String_Object_Object_prs|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_ret|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-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:addCheckBox-String_Object_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Object_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_Object_sam|trigger=none}{code:language=javascript} // add a new menu to the menubar var menubar = plugins.window.getMenuBar(); var menu = menubar.addMenu(); menu.text = "New Menu"; // alternatively create a popup menu //var menu = plugins.window.createPopupMenu(); // 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"); // 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_Object_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_Object_Object_String_des|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_snc|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_prs|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_Object_String_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_String_ret|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_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_Object_Object_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Object_Object_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_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"); // 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_Object_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_Object_Object_String_Boolean_des|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:addCheckBox-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:addCheckBox-String_Object_Object_String_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_String_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-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:addCheckBox-String_Object_Object_String_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Object_Object_String_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_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"); // 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_Object_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_Object_Object_String_Boolean_Number_des|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_Boolean_Number_snc|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_Boolean_Number_prs|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_Object_String_Boolean_Number_prs|trigger=none|class=sIndent}\{[String]} name -- the checkbox text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_String_Boolean_Number_ret|text=|trigger=button}{sub-section}{sub-section:addCheckBox-String_Object_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_Object_Object_String_Boolean_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_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_Object_Object_String_Boolean_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addCheckBox-String_Object_Object_String_Boolean_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addCheckBox-String_Object_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"); // 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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=button}{sub-section}{sub-section:addMenu-String_prs|trigger=none|class=sIndent}\{[String]} name -- the text of the submenu {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenu-String_ret|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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}{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"); // 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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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"); // 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|text=|trigger=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|text=|trigger=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|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem-String_ret|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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"); // 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_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){span}{td}{tr}{tr:id=des}{td}{sub-section:addMenuItem-String_Object_des|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_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_Object_snc|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_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_Object_prs|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item 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:addMenuItem-String_Object_ret|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_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_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_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_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_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"); // 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_Object_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_Object_Object_des|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_snc|text=|trigger=button}{sub-section}{sub-section:addMenuItem-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:addMenuItem-String_Object_Object_prs|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_Object_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_ret|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-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:addMenuItem-String_Object_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Object_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_Object_sam|trigger=none}{code:language=javascript} // add a new menu to the menubar var menubar = plugins.window.getMenuBar(); var menu = menubar.addMenu(); menu.text = "New Menu"; // alternatively create a popup menu //var menu = plugins.window.createPopupMenu(); // 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"); // 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_Object_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_Object_Object_String_des|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_snc|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_prs|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_Object_String_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_String_ret|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_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_Object_Object_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Object_Object_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_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"); // 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_Object_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_Object_Object_String_Boolean_des|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:addMenuItem-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:addMenuItem-String_Object_Object_String_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_Object_String_Boolean_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_String_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-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:addMenuItem-String_Object_Object_String_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_Object_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Object_Object_String_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_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"); // 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_Object_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_Object_Object_String_Boolean_Number_des|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_Boolean_Number_snc|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_Boolean_Number_prs|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_Object_String_Boolean_Number_prs|trigger=none|class=sIndent}\{[String]} name -- the menu item text \{[Object]} feedback_item -- this can be either a method or an array representing a submenu \{[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_Object_Object_String_Boolean_Number_ret|text=|trigger=button}{sub-section}{sub-section:addMenuItem-String_Object_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_Object_Object_String_Boolean_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_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_Object_Object_String_Boolean_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenuItem-String_Object_Object_String_Boolean_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenuItem-String_Object_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"); // 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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton_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-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=sIndent}{sub-section:addRadioButton-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-Number_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|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|text=|trigger=button}{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|text=|trigger=button}{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|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=see}{td}*Also see*\\{sub-section:addRadioButton-String_see|text=|trigger=button}{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|text=|trigger=button}{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|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}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_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_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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Object_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_Object_Object_String_des|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_String_snc|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_String_prs|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_Object_String_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 {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Object_Object_String_ret|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_Object_String_ret|trigger=none|class=sIndent}[RadioButton] -- a radio button menu item{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRadioButton-String_Object_Object_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRadioButton-String_Object_Object_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Object_Object_String_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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Object_Object_String_Boolean|class=node}{tr:id=name}{td}h6.addRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}addRadioButton{span}{span:id=iets|style=float: left;}\(name, feedback_item, icon, mnemonic, enabled){span}{td}{tr}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRadioButton-String_Object_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_Object_Object_String_Boolean_Number_des|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_String_Boolean_Number_snc|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_String_Boolean_Number_prs|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_Object_String_Boolean_Number_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 \{[Number]} align -- the alignment type {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton-String_Object_Object_String_Boolean_Number_ret|text=|trigger=button}{sub-section}{sub-section:addRadioButton-String_Object_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_Object_Object_String_Boolean_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_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_Object_Object_String_Boolean_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_Object_String_Boolean_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRadioButton-String_Object_Object_String_Boolean_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addRadioButton-String_Object_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"); // 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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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"); // 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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=button}{sub-section}{sub-section:getClientProperty_des|trigger=none|class=sIndent}Gets the specified client property for the element based on a key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:getClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:getClientProperty_prs|trigger=none|class=sIndent}\{[Object]} key {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:getClientProperty_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_sam|trigger=none}{code:language=javascript} // 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|text=|trigger=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|text=|trigger=button}{sub-section}{sub-section:addSeparatorgetItem_prssnc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getItem_prs|text=|trigger=button}{sub-section}{sub-section:getItem_prs|trigger=none|class=sIndent}\{[Number]} index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addSeparatorgetItem_ret|text=|trigger=button}{sub-section}{sub-section:addSeparatorgetItem_ret|trigger=none|class=sIndent}void[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addSeparatorgetItem_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addSeparatorgetItem_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addSeparatorgetItem_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addSeparatorgetItem_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addSeparatorgetItem_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addSeparatorgetItem_sam|trigger=none}{code:language=javascript} var popupmenutrigger=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() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10)(); // 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=getCheckBoxgetItemCount|class=node}{tr:id=name}{td}h6.getCheckBoxgetItemCount{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[CheckBoxNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}getCheckBoxgetItemCount{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getCheckBoxgetItemCount_des|text=|trigger=button}{sub-section}{sub-section:getCheckBoxgetItemCount_des|trigger=none|class=sIndent}Get the Checkboxnumber atof theitems selectedin index (starting at 0)the menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getCheckBoxgetItemCount_snc|text=|trigger=button}{sub-section}{sub-section:getCheckBoxgetItemCount_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:getCheckBoxgetItemCount_prs|text=|trigger=button}{sub-section}{sub-section:getCheckBoxgetItemCount_prs|trigger=none|class=sIndent}index {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getCheckBoxgetItemCount_ret|text=|trigger=button}{sub-section}{sub-section:getCheckBoxgetItemCount_ret|trigger=none|class=sIndent}[CheckBoxNumber]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getCheckBoxgetItemCount_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getCheckBoxgetItemCount_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getCheckBoxgetItemCount_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getCheckBoxgetItemCount_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getCheckBoxgetItemCount_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getCheckBoxgetItemCount_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); }// 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=getClientPropertygetItemIndexByText|class=node}{tr:id=name}{td}h6.getClientPropertygetItemIndexByText{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[ObjectNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}getClientPropertygetItemIndexByText{span}{span:id=iets|style=float: left;}\(keytext){span}{td}{tr}{tr:id=des}{td}{sub-section:getClientPropertygetItemIndexByText_des|text=|trigger=button}{sub-section}{sub-section:getClientPropertygetItemIndexByText_des|trigger=none|class=sIndent}Gets the specified client property forRetrieve the index of the elementitem based on a keyby text.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientPropertygetItemIndexByText_snc|text=|trigger=button}{sub-section}{sub-section:getClientPropertygetItemIndexByText_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientPropertygetItemIndexByText_prs|text=|trigger=button}{sub-section}{sub-section:getClientPropertygetItemIndexByText_prs|trigger=none|class=sIndent}key\{[String]} text {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientPropertygetItemIndexByText_ret|text=|trigger=button}{sub-section}{sub-section:getClientPropertygetItemIndexByText_ret|trigger=none|class=sIndent}[ObjectNumber]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientPropertygetItemIndexByText_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientPropertygetItemIndexByText_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientPropertygetItemIndexByText_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientPropertygetItemIndexByText_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientPropertygetItemIndexByText_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientPropertygetItemIndexByText_sam|trigger=none}{code:language=javascript} // add a new menu to the menubar var popupmenumenubar = plugins.window.createPopupMenugetMenuBar(); var menuitem1menu = popupmenumenubar.addMenuItemaddMenu('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); }); 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=getItemgetMenu|class=node}{tr:id=name}{td}h6.getItemgetMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItemMenu]{span}{span:id=iets|style=float: left; font-weight: bold;}getItemgetMenu{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getItemgetMenu_des|text=|trigger=button}{sub-section}{sub-section:getItemgetMenu_des|trigger=none|class=sIndent}Get the itemsubmenu at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemgetMenu_snc|text=|trigger=button}{sub-section}{sub-section:getItemgetMenu_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getItemgetMenu_prs|text=|trigger=button}{sub-section}{sub-section:getItemgetMenu_prs|trigger=none|class=sIndent}\{[Number]} index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getItemgetMenu_ret|text=|trigger=button}{sub-section}{sub-section:getItemgetMenu_ret|trigger=none|class=sIndent}[MenuItemMenu]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItemgetMenu_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemgetMenu_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItemgetMenu_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemgetMenu_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItemgetMenu_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemgetMenu_sam|trigger=none}{code:language=javascript} var popupmenujavascript} // 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() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10)(); // 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=getItemCountgetRadioButton|class=node}{tr:id=name}{td}h6.getItemCountgetRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[NumberRadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}getItemCountgetRadioButton{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getItemCountgetRadioButton_des|text=|trigger=button}{sub-section}{sub-section:getItemCountgetRadioButton_des|trigger=none|class=sIndent}Get the radiobutton at numberthe ofselected itemsindex in(starting theat menu0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemCountgetRadioButton_snc|text=|trigger=button}{sub-section}{sub-section:getItemCountgetRadioButton_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:getItemCountgetRadioButton_prs|text=|trigger=button}{sub-section}{sub-section:getItemCountgetRadioButton_prs|trigger=none|class=sIndent}\{[Number]} index {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getItemCountgetRadioButton_ret|text=|trigger=button}{sub-section}{sub-section:getItemCountgetRadioButton_ret|trigger=none|class=sIndent}[NumberRadioButton]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItemCountgetRadioButton_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemCountgetRadioButton_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItemCountgetRadioButton_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemCountgetRadioButton_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItemCountgetRadioButton_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemCountgetRadioButton_sam|trigger=none}{code:language=javascript} var popupmenucode: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 menuitem1submenu = popupmenu menu.addMenu("submenu"); submenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10)"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=getItemIndexByTextputClientProperty|class=node}{tr:id=name}{td}h6.getItemIndexByTextputClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]void{span}{span:id=iets|style=float: left; font-weight: bold;}getItemIndexByTextputClientProperty{span}{span:id=iets|style=float: left;}\(namekey, value){span}{td}{tr}{tr:id=des}{td}{sub-section:getItemIndexByTextputClientProperty_des|text=|trigger=button}{sub-section}{sub-section:getItemIndexByTextputClientProperty_des|trigger=none|class=sIndent}RetrieveSets the indexvalue offor the specified element itemclient byproperty textkey.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemIndexByTextputClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:getItemIndexByTextputClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getItemIndexByTextputClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:getItemIndexByTextputClientProperty_prs|trigger=none|class=sIndent}name}\{[Object]} key \{[Object]} value {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getItemIndexByTextputClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:getItemIndexByTextputClientProperty_ret|trigger=none|class=sIndent}[Number]void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItemIndexByTextputClientProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByTextputClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItemIndexByTextputClientProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByTextputClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItemIndexByTextputClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByTextputClientProperty_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } // 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=getMenuremoveAllItems|class=node}{tr:id=name}{td}h6.getMenuremoveAllItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]void{span}{span:id=iets|style=float: left; font-weight: bold;}getMenuremoveAllItems{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getMenuremoveAllItems_des|text=|trigger=button}{sub-section}{sub-section:getMenuremoveAllItems_des|trigger=none|class=sIndent}GetRemove theall submenuitems atfrom the selected index (starting at 0)menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMenuremoveAllItems_snc|text=|trigger=button}{sub-section}{sub-section:getMenuremoveAllItems_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:getMenuremoveAllItems_prs|text=|trigger=button}{sub-section}{sub-section:getMenuremoveAllItems_prs|trigger=none|class=sIndent}index {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getMenuremoveAllItems_ret|text=|trigger=button}{sub-section}{sub-section:getMenuremoveAllItems_ret|trigger=none|class=sIndent}[Menu]void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMenuremoveAllItems_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuremoveAllItems_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMenuremoveAllItems_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuremoveAllItems_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMenuremoveAllItems_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuremoveAllItems_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() // add a new menu to the menubar var menuitem1menubar = popupmenuplugins.window.addMenuItemgetMenuBar('A',myMethod); var menuitem2menu = popupmenumenubar.addRadioButtonaddMenu('B',myMethod) var menuitem3; menu.text = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); }"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=getRadioButtonremoveItem|class=node}{tr:id=name}{td}h6.getRadioButtonremoveItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]void{span}{span:id=iets|style=float: left; font-weight: bold;}getRadioButtonremoveItem{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getRadioButtonremoveItem_des|text=|trigger=button}{sub-section}{sub-section:getRadioButtonremoveItem_des|trigger=none|class=sIndent}GetRemove the Radiobuttonitem(s) at the selected index (starting at 0)/indices.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getRadioButtonremoveItem_snc|text=|trigger=button}{sub-section}{sub-section:getRadioButtonremoveItem_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getRadioButtonremoveItem_prs|text=|trigger=button}{sub-section}{sub-section:getRadioButtonremoveItem_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:getRadioButtonremoveItem_ret|text=|trigger=button}{sub-section}{sub-section:getRadioButtonremoveItem_ret|trigger=none|class=sIndent}[RadioButton]void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getRadioButtonremoveItem_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRadioButtonremoveItem_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getRadioButtonremoveItem_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRadioButtonremoveItem_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getRadioButtonremoveItem_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRadioButtonremoveItem_sam|trigger=none}{code:language=javascript} var// popupmenuadd = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); }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=putClientPropertyshow|class=node}{tr:id=name}{td}h6.putClientPropertyshow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}putClientPropertyshow{span}{span:id=iets|style=float: left;}\(key, value){span}{td}{tr}{tr:id=des}{td}{sub-section:putClientPropertyshow_des|text=|trigger=button}{sub-section}{sub-section:putClientPropertyshow_des|trigger=none|class=sIndent}SetsShow the valuepopup forat the mouse specifiedcoordinates element(Smart client property keyonly).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putClientPropertyshow_snc|text=|trigger=button}{sub-section}{sub-section:putClientPropertyshow_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:putClientPropertyshow_prs|text=|trigger=button}{sub-section}{sub-section:putClientPropertyshow_prs|trigger=none|class=sIndent}key value {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:putClientPropertyshow_ret|text=|trigger=button}{sub-section}{sub-section:putClientPropertyshow_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putClientPropertyshow_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertyshow_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientPropertyshow_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertyshow_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putClientPropertyshow_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientPropertyshow_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); }// 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=removeAllItemsshow-RuntimeComponent|class=node}{tr:id=name}{td}h6.removeAllItemsshow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeAllItemsshow{span}{span:id=iets|style=float: left;}\(component){span}{td}{tr}{tr:id=des}{td}{sub-section:removeAllItemsshow-RuntimeComponent_des|text=|trigger=button}{sub-section}{sub-section:removeAllItemsshow-RuntimeComponent_des|trigger=none|class=sIndent}RemoveShow allthe itemspopup fromabove the specified menuelement.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeAllItemsshow-RuntimeComponent_snc|text=|trigger=button}{sub-section}{sub-section:removeAllItemsshow-RuntimeComponent_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:removeAllItemsshow-RuntimeComponent_prs|text=|trigger=button}{sub-section}{sub-section:removeAllItemsshow-RuntimeComponent_prs|trigger=none|class=sIndent}\{[RuntimeComponent]} component {sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:removeAllItemsshow-RuntimeComponent_ret|text=|trigger=button}{sub-section}{sub-section:removeAllItemsshow-RuntimeComponent_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeAllItemsshow-RuntimeComponent_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllItemsshow-RuntimeComponent_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeAllItemsshow-RuntimeComponent_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllItemsshow-RuntimeComponent_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeAllItemsshow-RuntimeComponent_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllItemsshow-RuntimeComponent_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } // 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=removeItemshow-RuntimeComponent_Number_Number|class=node}{tr:id=name}{td}h6.removeItemshow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeItemshow{span}{span:id=iets|style=float: left;}\(indexcomponent, 1x, \[index 2-n\]y){span}{td}{tr}{tr:id=des}{td}{sub-section:removeItemshow-RuntimeComponent_Number_Number_des|text=|trigger=button}{sub-section}{sub-section:removeItemshow-RuntimeComponent_Number_Number_des|trigger=none|class=sIndent}RemoveShow the item(s) at the selected index/indicespopup 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:removeItemshow-RuntimeComponent_Number_Number_snc|text=|trigger=button}{sub-section}{sub-section:removeItemshow-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:removeItemshow-RuntimeComponent_Number_Number_prs|text=|trigger=button}{sub-section}{sub-section:removeItemshow-RuntimeComponent_Number_Number_prs|trigger=none|class=sIndent}\{[RuntimeComponent]}index 1component \{[indexNumber]} x 2\-n\]\{[Number]} y {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:removeItemshow-RuntimeComponent_Number_Number_ret|text=|trigger=button}{sub-section}{sub-section:removeItemshow-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:removeItemshow-RuntimeComponent_Number_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeItemshow-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:removeItemshow-RuntimeComponent_Number_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeItemshow-RuntimeComponent_Number_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeItemshow-RuntimeComponent_Number_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeItemshow-RuntimeComponent_Number_Number_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } // 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;}\(\[element\], \[x\], \[y\]){span}{td}{tr}{tr:id=des}{td}{sub-section:show-Number_Number_des|text=|trigger=button}{sub-section}{sub-section:show-Number_Number_des|trigger=none|class=sIndent}Show the popup below the element or addat x an y values relative to the elementcoordinates.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show-Number_Number_snc|text=|trigger=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|text=|trigger=button}{sub-section}{sub-section:show-Number_Number_prs|trigger=none|class=sIndent}\{[element\Number]} x \{[x\Number]} \[y\] {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:show-Number_Number_ret|text=|trigger=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|text=|trigger=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|text=|trigger=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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:show-Number_Number_sam|trigger=none}{code:language=javascript} var popupmenu = plugins.window.createPopupMenu() var menuitem1 = popupmenu.addMenuItem('A',myMethod) var menuitem2 = popupmenu.addRadioButton('B',myMethod) var menuitem3 = popupmenu.addRadioButton('C',myMethod) var menuitem4 = popupmenu.addSeparator() var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod) var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod) //add arguments to the method call menuitem6.methodArguments = ['arg1', 'another argument'] var submenu = popupmenu.addMenu('SubMenu') var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod) var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif') var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key menuitem2.selected = true; menuitem6.enabled = false subitem2.selected = true; var source = event.getSource() if (source != null) { popupmenu.show(source); //or you can set the coordinates popupmenu.show(10, 10); } // NOTE: usually this code is placed in a handler of an event (e.g. right click on some component) // create a popup menu var menu = plugins.window.createPopupMenu(); // add a menu item menu.addMenuItem("item", feedback_item); // add another menu item menu.addMenuItem("item 2", feedback_item); if (event.getSource()) { // display the popup over the component which is the source of the event menu.show(event.getSource()); // display the popup over the components, at specified coordinates relative to the component //menu.show(event.getSource(), 10, 10); // display the popup at specified coordinates relative to the main window //menu.show(100, 100); } // in Smart client, you can also use show with no parameters, it will show at the mouse coordinates: //menu.show(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |
Overview
Content Tools
Activity