Child pages
  • Menu

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{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 sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summery{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#text] {td}{tr}{tbody}{table}\\ {table:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summery{th}{tr}{tbody}{tr}{td}[CheckBox]{td}{td}[#addCheckBox]\(\[name\], \[method\], \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add the Checkbox at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[Menu]{td}{td}[#addMenu]\(\[name\], \[menu\], \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add the submenu at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#addMenuItem]\(\[name\], \[method\], \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add the item at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[RadioButton]{td}{td}[#addRadioButton]\(\[name\], \[method\], \[icon\], \[mnemonic\], \[enabled\], \[align\]) Add the Radiobutton at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addRadioGroup]\() Add a Radiogroup for the Radiobuttons.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addSeparator]\() Add the separator at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#doClick]\(click) Script the selection (emulate a mouse click) of the menu.{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}[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]\(name) 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}[#removeAllItems]\() Remove all items from the menu.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeItem]\(index 1, \[index 2-n\]) Remove the item(s) at the selected index/indices.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setEnabled]\(enabled) Set the the selected menu enabled or disabled.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setIcon]\(icon) Set the icon of the menu.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setMnemonic]\(mnemonic) Set the mnemonic of the selected menu.{td}{tr}{tbody}{table}\\ {table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=text|class=node}{tr:id=name}{td}h6.text{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:text_des|text=|trigger=button}{sub-section}{sub-section:text_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:text_snc|text=|trigger=button}{sub-section}{sub-section:text_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:text_prs|text=|trigger=button}{sub-section}{sub-section:text_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:text_ret|text=|trigger=button}{sub-section}{sub-section:text_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:text_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:text_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:text_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:text_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:text_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:text_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=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 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: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} // Add the Checkbox at the selected index (starting at 0) or add it at the end (empty). // get the menu at the last index // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); // 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 properties // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end var checkbox = menu.addCheckBox("checkbox with feedback",feedback_checkbox); var checkbox = menu.addCheckBox("checkbox selected",feedback_checkbox); // set the checkbox to selected checkbox.setSelected(true); var checkbox = menu.addCheckBox("checkbox with input"); // add an 'input' array. the array will be concatenated to the end of the arguments // array which can be read out in the selected method var input = [1,"is","the","added","input",false]; checkbox.setMethod(feedback_checkbox, input); // create a checkbox with an icon var checkbox = menu.addCheckBox("checkbox with icon",feedback_checkbox,"media:///yourimage.gif"); var checkbox = menu.addCheckBox("checkbox with accelerator",feedback_checkbox,"media:///yourimage.gif"); // add an accelerator key ('alt shift a' in the below example) // REMARK: always test the accelerator key. sometimes they will not work because // these keys already have an 'action' assigned to them via the operating system. checkbox.setAccelerator("alt shift a"); var checkbox = menu.addCheckBox("checkbox with mnemonic",feedback_checkbox,false,input,"media:///yourimage.gif"); // add a mnemonic key ('i' in our example) which is the underlined shortkey on windows // REMARK: setting the mnemonic key is platform dependent checkbox.setMnemonic("i"); var checkbox = menu.addCheckBox("checkbox disabled",feedback_checkbox); // disable the menu item checkbox.setEnabled(false); var checkbox = menu.addCheckBox("checkbox invisible",feedback_checkbox); // set the menu item disabled and NOT visible checkbox.setVisible(false); // add a separator at the last position or at a given index menu.addSeparator(); {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;}\(\[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}{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}{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-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenu_ret|text=|trigger=button}{sub-section}{sub-section:addMenu_ret|trigger=none|class=sIndent}[Menu]{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 the submenu at the selected index (starting at 0) or add it at the end (empty). // get the menu at the last index // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); // add a (first) submenu var submenu1 = menu.addMenu("submenu 1"); submenu1.addMenuItem("sub item 1",globals.feedback_item); // add a (second) submenu var submenu2 = submenu1.addMenu("submenu 2"); submenu2.addMenuItem("sub item 2",globals.feedback_item); // add a (third) submenu var submenu3 = submenu1.addMenu("submenu 3"); submenu3.addMenuItem("sub item 3",globals.feedback_item); // add a (first) submenu to the (third) submenu var submenu4 = submenu3.addMenu("submenu 4"); submenu4.addMenuItem("sub item 4",globals.feedback_item); // add a (first) submenu to the (first) submenu of the (third) submenu var submenu5 = submenu4.addMenu("submenu 5"); submenu5.addMenuItem("sub item 5",globals.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;}\(\[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|text=|trigger=button}{sub-section}{sub-section:addMenuItem_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenuItem_prs|text=|trigger=button}{sub-section}{sub-section:addMenuItem_prs|trigger=none|class=sIndent}\[name\] \[method\] \[icon\] \[mnemonic\] \[enabled\] \[align\] {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenuItem_ret|text=|trigger=button}{sub-section}{sub-section:addMenuItem_ret|trigger=none|class=sIndent}[MenuItem]{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 the item at the selected index (starting at 0) or add it at the end (empty). // get the menu at the last index // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); // 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 // create the settings for the specified menu item // minimum settings are the text and method properties // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end var item = menu.addMenuItem("item with feedback",globals.feedback_item); var item = menu.addMenuItem(); // add an 'input' array. the array will be concatenated to the end of the arguments // array which can be read out in the selected method var input = [1,"is","the","added","input",false]; item.text = "item with input"; item.setMethod(globals.feedback_item,input); var item = menu.addMenuItem(); // add an icon to the item item.text = "item with icon"; item.setMethod(globals.feedback_item, input); item.setIcon("media:///yourimage.gif"); var item = menu.addMenuItem(); // add an accelerator key ('alt shift 2' in the below example) // REMARK: always test the accelerator key. sometimes they will not work because // these keys already have an 'action' assigned to them via the operating system. item.text = "item with accelerator"; item.setMethod(globals.feedback_item, input); item.setIcon("media:///yourimage.gif"); item.setAccelerator("alt shift 2"); var item = menu.addMenuItem(); // add a mnemonic key ('i' in our example) which is the underlined shortkey on windows // REMARK: setting the mnemonic key is platform dependent // the accelerator key will not work in this and the next example item.text = "item with mnemonic"; item.setMethod(globals.feedback_item, input); item.setIcon("media:///yourimage.gif"); item.setAccelerator("pressed COMMA"); item.setMnemonic("i"); // create a disabled menu item var item = menu.addMenuItem("item disabled",globals.feedback_item,"media:///yourimage.gif","t",false); // set the method args item.setMethodArguments(input); var item = menu.addMenuItem("item visible",globals.feedback_item,"media:///yourimage.gif","e"); // this accelerator key will work item.setAccelerator("shift meta PAGE_DOWN"); var item = menu.addMenuItem("item invisible",globals.feedback_item,"media:///yourimage.gif"); // now the item is enabled and NOT visible item.setVisible(false); // add a separator at the last position or at a given index menu.addSeparator(); return; {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|text=|trigger=button}{sub-section}{sub-section:addRadioButton_prs|trigger=none|class=sIndent}\[name\] \[method\] \[icon\] \[mnemonic\] \[enabled\] \[align\] {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRadioButton_ret|text=|trigger=button}{sub-section}{sub-section:addRadioButton_ret|trigger=none|class=sIndent}[RadioButton]{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}{code:language=javascript} // Add the Radiobutton at the selected index (starting at 0) or add it at the end (empty). // get the menu at the last index // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); // 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 menu.addRadioGroup(); // 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 // create the settings for the specified menu item // minimum settings are the text and method properties // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end var radiobutton = menu.addRadioButton("radiobutton with feedback",feedback_radiobutton); var radiobutton = menu.addRadioButton("radiobutton selected",feedback_radiobutton); // set the radiobutton to selected radiobutton.setSelected(true); var radiobutton = menu.addRadioButton("radiobutton with input"); // add an 'input' array. the array will be concatenated to the end of the arguments // array which can be read out in the selected method var input = [1,"is","the","added","input",false]; radiobutton.setMethod(feedback_radiobutton,input); // create an item with an icon var radiobutton = menu.addRadioButton("radiobutton with icon",feedback_radiobutton,"media:///yourimage.gif"); var radiobutton = menu.addRadioButton("radiobutton with accelerator",feedback_radiobutton); // add an accelerator key ('alt shift 3' in the below example) // REMARK: always test the accelerator key. sometimes they will not work because // these keys already have an 'action' assigned to them via the operating system. radiobutton.setAccelerator("alt shift 3"); // add a separator at the last position or at a given index menu.addSeparator(); // add a new Radiobutton group menu.addRadioGroup(); // add a mnemonic key ('i' in our example) which is the underlined shortkey on windows // REMARK: setting the mnemonic key is platform dependent var radiobutton = menu.addRadioButton("radiobutton with mnemonic",feedback_radiobutton,"media:///yourimage.gif","i"); var radiobutton = menu.addRadioButton("radiobutton disabled",feedback_radiobutton); // disable the menu item radiobutton.setEnabled(false); var radiobutton = menu.addRadioButton("radiobutton invisible",feedback_radiobutton); // now the item is enabled and NOT visible radiobutton.setVisible(false); // add a separator at the last position or at a given index menu.addSeparator(); {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_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 Radiogroup for the Radiobuttons. // get the menu at the last index // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); // 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 menu.addRadioGroup(); // 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 // create the settings for the specified menu item // minimum settings are the text and method properties // the method can be a global or form method // be sure to enter the method WITHOUT '()' at the end var radiobutton = menu.addRadioButton("radiobutton with feedback",feedback_radiobutton); var radiobutton = menu.addRadioButton("radiobutton selected",feedback_radiobutton); // set the radiobutton to selected radiobutton.setSelected(true); var radiobutton = menu.addRadioButton("radiobutton with input"); // add an 'input' array. the array will be concatenated to the end of the arguments // array which can be read out in the selected method var input = [1,"is","the","added","input",false]; radiobutton.setMethod(feedback_radiobutton,input); // create an item with an icon var radiobutton = menu.addRadioButton("radiobutton with icon",feedback_radiobutton,"media:///yourimage.gif"); var radiobutton = menu.addRadioButton("radiobutton with accelerator",feedback_radiobutton); // add an accelerator key ('alt shift 3' in the below example) // REMARK: always test the accelerator key. sometimes they will not work because // these keys already have an 'action' assigned to them via the operating system. radiobutton.setAccelerator("alt shift 3"); // add a separator at the last position or at a given index menu.addSeparator(); // add a new Radiobutton group menu.addRadioGroup(); // add a mnemonic key ('i' in our example) which is the underlined shortkey on windows // REMARK: setting the mnemonic key is platform dependent var radiobutton = menu.addRadioButton("radiobutton with mnemonic",feedback_radiobutton,"media:///yourimage.gif","i"); var radiobutton = menu.addRadioButton("radiobutton disabled",feedback_radiobutton); // disable the menu item radiobutton.setEnabled(false); var radiobutton = menu.addRadioButton("radiobutton invisible",feedback_radiobutton); // now the item is enabled and NOT visible radiobutton.setVisible(false); // add a separator at the last position or at a given index menu.addSeparator(); {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 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|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 the separator at the selected index (starting at 0) or add it at the end (empty). plugins.window.getMenu(0).addSeparator(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=doClick|class=node}{tr:id=name}{td}h6.doClick{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}doClick{span}{span:id=iets|style=float: left;}\(click){span}{td}{tr}{tr:id=des}{td}{sub-section:doClick_des|text=|trigger=button}{sub-section}{sub-section:doClick_des|trigger=none|class=sIndent}Script the selection (emulate a mouse click) of the menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:doClick_snc|text=|trigger=button}{sub-section}{sub-section:doClick_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:doClick_prs|text=|trigger=button}{sub-section}{sub-section:doClick_prs|trigger=none|class=sIndent}click {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:doClick_ret|text=|trigger=button}{sub-section}{sub-section:doClick_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:doClick_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClick_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:doClick_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClick_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:doClick_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:doClick_sam|trigger=none}{code:language=javascript} // Script the selection (emulate a mouse click) of the menu. plugins.window.getMenu(0).doClick(); {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}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} // Get the Checkbox at the selected index (starting at 0). // get the menu at the last position // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); var checkbox = menu.getCheckBox(0); checkbox.setText("Changed menu item"); // REMARK: we actually changed an original menu (item)! As a result resetting the // menubar will NOT reset the above changes. We need to reset the menu (item) // manually the following way: // get the menu // var menu = plugins.window.getMenu(2); // get the item // var item = menu.getItem(0); // reset the values to default // notice we use an i18n message here the same way you would use it with // standard Servoy methods and plugins // item.setText("i18n:servoy.menuitem.viewAsRecord"); {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:getItem_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getItem_prs|text=|trigger=button}{sub-section}{sub-section:getItem_prs|trigger=none|class=sIndent}index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getItem_ret|text=|trigger=button}{sub-section}{sub-section:getItem_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItem_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItem_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItem_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItem_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItem_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItem_sam|trigger=none}{code:language=javascript} // Get the item at the selected index (starting at 0). // get the menu at the last position // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); var item = menu.getItem(0); item.setText("Changed menu item"); // REMARK: we actually changed an original menu (item)! As a result resetting the // menubar will NOT reset the above changes. We need to reset the menu (item) // manually the following way: // get the menu // var menu = plugins.window.getMenu(2); // get the item // var item = menu.getItem(0); // reset the values to default // notice we use an i18n message here the same way you would use it with // standard Servoy methods and plugins // item.setText("i18n:servoy.menuitem.viewAsRecord"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getItemCount|class=node}{tr:id=name}{td}h6.getItemCount{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getItemCount{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getItemCount_des|text=|trigger=button}{sub-section}{sub-section:getItemCount_des|trigger=none|class=sIndent}Get the number of items in the menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemCount_snc|text=|trigger=button}{sub-section}{sub-section:getItemCount_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getItemCount_prs|text=|trigger=button}{sub-section}{sub-section:getItemCount_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getItemCount_ret|text=|trigger=button}{sub-section}{sub-section:getItemCount_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItemCount_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemCount_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItemCount_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemCount_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItemCount_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemCount_sam|trigger=none}{code:language=javascript} // Get the number of items in the menu. // 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 application.output(plugins.window.getMenu(0).getItemCount()); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getItemIndexByText|class=node}{tr:id=name}{td}h6.getItemIndexByText{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getItemIndexByText{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:getItemIndexByText_des|text=|trigger=button}{sub-section}{sub-section:getItemIndexByText_des|trigger=none|class=sIndent}Retrieve the index of the item by text.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getItemIndexByText_snc|text=|trigger=button}{sub-section}{sub-section:getItemIndexByText_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getItemIndexByText_prs|text=|trigger=button}{sub-section}{sub-section:getItemIndexByText_prs|trigger=none|class=sIndent}name {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getItemIndexByText_ret|text=|trigger=button}{sub-section}{sub-section:getItemIndexByText_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getItemIndexByText_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByText_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getItemIndexByText_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByText_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getItemIndexByText_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getItemIndexByText_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=getMenu|class=node}{tr:id=name}{td}h6.getMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]{span}{span:id=iets|style=float: left; font-weight: bold;}getMenu{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getMenu_des|text=|trigger=button}{sub-section}{sub-section:getMenu_des|trigger=none|class=sIndent}Get the submenu at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMenu_snc|text=|trigger=button}{sub-section}{sub-section:getMenu_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getMenu_prs|text=|trigger=button}{sub-section}{sub-section:getMenu_prs|trigger=none|class=sIndent}index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getMenu_ret|text=|trigger=button}{sub-section}{sub-section:getMenu_ret|trigger=none|class=sIndent}[Menu]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMenu_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenu_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMenu_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenu_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMenu_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenu_sam|trigger=none}{code:language=javascript} // Get the submenu at the selected index (starting at 0). // get the menu at the last position // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); var checkbox = menu.getMenu(0); checkbox.setText("Changed menu item"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRadioButton|class=node}{tr:id=name}{td}h6.getRadioButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}getRadioButton{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getRadioButton_des|text=|trigger=button}{sub-section}{sub-section:getRadioButton_des|trigger=none|class=sIndent}Get the Radiobutton
Wiki Markup
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Property SummaryRetrieve/set the text.

servoy sSummary12%30%58%height: 30px;3Methods SummaryAdd a checkbox.Add a checkbox at the selected index (starting at 0) or at the end.Add a checkbox with given name.Add a checkbox at the selected index (starting at 0) or at the end.Add a checkbox at the selected index (starting at 0) or at the end.Add a checkbox at the selected index (starting at 0) or at the end.Add a checkbox at the selected index (starting at 0) or at the end.Add a checkbox at the selected index (starting at 0) or at the end.Add a submenu at the end.Add a submenu at the selected index (starting at 0).Add a submenu with given name.Add a menu item.Add a menu item at the selected index (starting at 0) or at the end.Add a menu item with given name.Add a menu item at the selected index (starting at 0) or at the end.Add a menu item at the selected index (starting at 0) or at the end.Add a menu item at the selected index (starting at 0) or at the end.Add a menu item at the selected index (starting at 0) or at the end.Add a menu item at the selected index (starting at 0) or at the end.Add a radio button.Add a radiobutton at the selected index (starting at 0) or at the end.Add a radio button with given name.Add a radiobutton at the selected index (starting at 0) or at the end.Add a radiobutton at the selected index (starting at 0) or at the end.Add a radiobutton at the selected index (starting at 0) or at the end.Add a radiobutton at the selected index (starting at 0) or at the end.Add a radiobutton at the selected index (starting at 0) or at the end.voidAdd a radiogroup for radiobuttons.voidAdd the separator at the selected index (starting at 0) or at the end (empty).voidAdd the separator at the selected index (starting at 0) or at the end (empty).voidScript the selection (emulate a mouse click) of the menu.Get the checkbox at the selected index (starting at 0).Gets the specified client property for the element based on a key.Get the item at the selected index (starting at 0).Get the number of items in the menu.Retrieve the index of the item by text.Get the submenu at the selected index (starting at 0).Get the radiobutton at the selected index (starting at 0).voidSets the value for the specified element client property key.voidRemove all items from the menu.voidRemove the item(s) at the selected index/indices.voidSet the the selected menu enabled or disabled.voidSet the icon of the menu.voidSet the mnemonic of the selected menu.

propertyservoy sDetail2100%height:30px2Property Detailstextname

text

dessIndent
Retrieve/set the text.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsaddCheckBoxname

addCheckBox()

dessIndent
Add a checkbox.
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowaddCheckBoxname

addCheckBox(index)

dessIndent
Add a checkbox at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentindexthe index at which to add the checkbox
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addCheckBoxname

addCheckBox(name)

dessIndent
Add a checkbox with given name.
prs

Parameters

sIndentnamethe checkbox text; this can be also html if enclosed between html tags
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addCheckBoxname

addCheckBox(name, feedback_item)

dessIndent
Add a checkbox at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe checkbox text; this can be also html if enclosed between html tagsfeedback_itemthe feedback function
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addCheckBoxname

addCheckBox(name, feedback_item, icon)

dessIndent
Add a checkbox at the selected index (starting at 0)
.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getRadioButton_snc|text=|trigger=button}{sub-section}{sub-section:getRadioButton_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getRadioButton_prs|text=|trigger=button}{sub-section}{sub-section:getRadioButton_prs|trigger=none|class=sIndent}index {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getRadioButton_ret|text=|trigger=button}{sub-section}{sub-section:getRadioButton_ret|trigger=none|class=sIndent}[RadioButton]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getRadioButton_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRadioButton_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getRadioButton_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRadioButton_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getRadioButton_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRadioButton_sam|trigger=none}{code:language=javascript} // Get the Radiobutton at the selected index (starting at 0). // get the menu at the last position // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); var checkbox = menu.getItem(0); checkbox.setText("Changed menu item"); // REMARK: we actually changed an original menu (item)! As a result resetting the // menubar will NOT reset the above changes. We need to reset the menu (item) // manually the following way: // get the menu // var menu = plugins.window.getMenu(2); // get the item // var item = menu.getItem(0); // reset the values to default // notice we use an i18n message here the same way you would use it with // standard Servoy methods and plugins // item.setText("i18n:servoy.menuitem.viewAsRecord"); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeAllItems|class=node}{tr:id=name}{td}h6.removeAllItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeAllItems{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:removeAllItems_des|text=|trigger=button}{sub-section}{sub-section:removeAllItems_des|trigger=none|class=sIndent}Remove all items from the menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeAllItems_snc|text=|trigger=button}{sub-section}{sub-section:removeAllItems_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:removeAllItems_prs|text=|trigger=button}{sub-section}{sub-section:removeAllItems_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:removeAllItems_ret|text=|trigger=button}{sub-section}{sub-section:removeAllItems_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeAllItems_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllItems_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeAllItems_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllItems_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeAllItems_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllItems_sam|trigger=none}{code:language=javascript} // Remove all items from the menu. // get the menu at the last index // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); // remove all menu items from the selected menu menu.removeAllItems(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeItem|class=node}{tr:id=name}{td}h6.removeItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeItem{span}{span:id=iets|style=float: left;}\(index 1, \[index 2-n\]){span}{td}{tr}{tr:id=des}{td}{sub-section:removeItem_des|text=|trigger=button}{sub-section}{sub-section:removeItem_des|trigger=none|class=sIndent}Remove the item(s) at the selected index/indices.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeItem_snc|text=|trigger=button}{sub-section}{sub-section:removeItem_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:removeItem_prs|text=|trigger=button}{sub-section}{sub-section:removeItem_prs|trigger=none|class=sIndent}index 1 \[index 2\-n\] {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:removeItem_ret|text=|trigger=button}{sub-section}{sub-section:removeItem_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeItem_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeItem_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeItem_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeItem_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeItem_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeItem_sam|trigger=none}{code:language=javascript} // Remove the item(s) at the selected index/indices. // get the menu at the last index // indexes start at 0 (zero) so index 2 is in fact position 3 var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1); // remove only one item at the selected index // from the selected menu // menu.removeItem(0); // remove more than one item at the selected indices // from the selected menu menu.removeItem(1,2); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setEnabled|class=node}{tr:id=name}{td}h6.setEnabled{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setEnabled{span}{span:id=iets|style=float: left;}\(enabled){span}{td}{tr}{tr:id=des}{td}{sub-section:setEnabled_des|text=|trigger=button}{sub-section}{sub-section:setEnabled_des|trigger=none|class=sIndent}Set the the selected menu enabled or disabled.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setEnabled_snc|text=|trigger=button}{sub-section}{sub-section:setEnabled_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setEnabled_prs|text=|trigger=button}{sub-section}{sub-section:setEnabled_prs|trigger=none|class=sIndent}enabled {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setEnabled_ret|text=|trigger=button}{sub-section}{sub-section:setEnabled_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setEnabled_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setEnabled_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setEnabled_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setEnabled_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setEnabled_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setEnabled_sam|trigger=none}{code:language=javascript} // Set the the selected menu enabled or disabled. var menu = plugins.window.getMenu(0); menu.setText("Hello"); menu.setMnemonic("H"); menu.setEnabled(false); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setIcon|class=node}{tr:id=name}{td}h6.setIcon{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setIcon{span}{span:id=iets|style=float: left;}\(icon){span}{td}{tr}{tr:id=des}{td}{sub-section:setIcon_des|text=|trigger=button}{sub-section}{sub-section:setIcon_des|trigger=none|class=sIndent}Set the icon of the menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setIcon_snc|text=|trigger=button}{sub-section}{sub-section:setIcon_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setIcon_prs|text=|trigger=button}{sub-section}{sub-section:setIcon_prs|trigger=none|class=sIndent}icon {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setIcon_ret|text=|trigger=button}{sub-section}{sub-section:setIcon_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setIcon_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setIcon_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setIcon_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setIcon_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setIcon_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setIcon_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=setMnemonic|class=node}{tr:id=name}{td}h6.setMnemonic{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setMnemonic{span}{span:id=iets|style=float: left;}\(mnemonic){span}{td}{tr}{tr:id=des}{td}{sub-section:setMnemonic_des|text=|trigger=button}{sub-section}{sub-section:setMnemonic_des|trigger=none|class=sIndent}Set the mnemonic of the selected menu.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setMnemonic_snc|text=|trigger=button}{sub-section}{sub-section:setMnemonic_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setMnemonic_prs|text=|trigger=button}{sub-section}{sub-section:setMnemonic_prs|trigger=none|class=sIndent}mnemonic {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setMnemonic_ret|text=|trigger=button}{sub-section}{sub-section:setMnemonic_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setMnemonic_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setMnemonic_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setMnemonic_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMnemonic_sam|trigger=none}{code:language=javascript} // Set the mnemonic of the selected menu. var menu = plugins.window.getMenu(0); menu.setText("Hello"); menu.setMnemonic("H"); menu.setEnabled(false); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
 or at the end.
prs

Parameters

sIndentnamethe checkbox text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe checkbox icon (can be an image URL or the image content byte array)
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addCheckBoxname

addCheckBox(name, feedback_item, icon, mnemonic)

dessIndent
Add a checkbox at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe checkbox text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe checkbox icon (can be an image URL or the image content byte array)mnemonicthe checkbox mnemonic
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addCheckBoxname

addCheckBox(name, feedback_item, icon, mnemonic, enabled)

dessIndent
Add a checkbox at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe checkbox text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe checkbox icon (can be an image URL or the image content byte array)mnemonicthe checkbox mnemonicenabledthe enabled state of the checkbox
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addCheckBoxname

addCheckBox(name, feedback_item, icon, mnemonic, enabled, align)

dessIndent
Add a checkbox at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe checkbox text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe checkbox icon (can be an image URL or the image content byte array)mnemonicthe checkbox mnemonicenabledthe enabled state of the checkboxalignthe alignment type
ret

Returns

sIndent checkbox
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuname

addMenu()

dessIndent
Add a submenu at the end.
ret

Returns

sIndent the submenu
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuname

addMenu(index)

dessIndent
Add a submenu at the selected index (starting at 0).
prs

Parameters

sIndentindexthe index at which to add the submenu
ret

Returns

sIndent the submenu
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuname

addMenu(name)

dessIndent
Add a submenu with given name.
prs

Parameters

sIndentnamethe text of the submenu; this can be also html if enclosed between html tags
ret

Returns

sIndent the submenu
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem()

dessIndent
Add a menu item.
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem(index)

dessIndent
Add a menu item at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentindexthe index at which to add the menu item
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem(name)

dessIndent
Add a menu item with given name.
prs

Parameters

sIndentnamethe menu item text; this can be also html if enclosed between html tags
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem(name, feedback_item)

dessIndent
Add a menu item at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe menu item text; this can be also html if enclosed between html tagsfeedback_itemthe feedback function
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem(name, feedback_item, icon)

dessIndent
Add a menu item at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe menu item text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe menu item icon (can be an image URL or the image content byte array)
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem(name, feedback_item, icon, mnemonic)

dessIndent
Add a menu item at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe menu item text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe menu item icon (can be an image URL or the image content byte array)mnemonicthe menu item mnemonic
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem(name, feedback_item, icon, mnemonic, enabled)

dessIndent
Add a menu item at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe menu item text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe menu item icon (can be an image URL or the image content byte array)mnemonicthe menu item mnemonicenabledthe enabled state of the menu item
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addMenuItemname

addMenuItem(name, feedback_item, icon, mnemonic, enabled, align)

dessIndent
Add a menu item at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe menu item text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe menu item icon (can be an image URL or the image content byte array).In NGClient we also support fontawesome class.mnemonicthe menu item mnemonicenabledthe enabled state of the menu itemalignthe alignment type
ret

Returns

sIndent menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton()

dessIndent
Add a radio button.
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton(index)

dessIndent
Add a radiobutton at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentindexthe index at which to add the radio button
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton(name)

dessIndent
Add a radio button with given name.
prs

Parameters

sIndentnamethe radio button text; this can be also html if enclosed between html tags
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton(name, feedback_item)

dessIndent
Add a radiobutton at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe radio button text; this can be also html if enclosed between html tagsfeedback_itemthe feedback function
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton(name, feedback_item, icon)

dessIndent
Add a radiobutton at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe radio button text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe radio button icon (can be an image URL or the image content byte array)
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton(name, feedback_item, icon, mnemonic)

dessIndent
Add a radiobutton at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe radio button text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe radio button icon (can be an image URL or the image content byte array)mnemonicthe radio button mnemonic
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton(name, feedback_item, icon, mnemonic, enabled)

dessIndent
Add a radiobutton at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe radio button text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe radio button icon (can be an image URL or the image content byte array)mnemonicthe radio button mnemonicenabledthe enabled state of radio button
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioButtonname

addRadioButton(name, feedback_item, icon, mnemonic, enabled, align)

dessIndent
Add a radiobutton at the selected index (starting at 0) or at the end.
prs

Parameters

sIndentnamethe radio button text; this can be also html if enclosed between html tagsfeedback_itemthe feedback functioniconthe radio button icon (can be an image URL or the image content byte array)mnemonicthe radio button mnemonicenabledthe enabled state of radio buttonalignthe alignment type
ret

Returns

sIndent a radio button menu item
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRadioGroupname

addRadioGroup()

dessIndent
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.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addSeparatorname

addSeparator()

dessIndent
Add the separator at the selected index (starting at 0) or at the end (empty).
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addSeparatorname

addSeparator(index)

dessIndent
Add the separator at the selected index (starting at 0) or at the end (empty).
prs

Parameters

sIndentindexthe index at which to add the separator
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
doClickname

doClick()

dessIndent
Script the selection (emulate a mouse click) of the menu.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getCheckBoxname

getCheckBox(index)

dessIndent
Get the checkbox at the selected index (starting at 0).
prs

Parameters

sIndentindex ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getClientPropertyname

getClientProperty(key)

dessIndent
Gets the specified client property for the element based on a key.
prs

Parameters

sIndentkey ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getItemname

getItem(index)

dessIndent
Get the item at the selected index (starting at 0).
prs

Parameters

sIndentindex ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getItemCountname

getItemCount()

dessIndent
Get the number of items in the menu.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getItemIndexByTextname

getItemIndexByText(text)

dessIndent
Retrieve the index of the item by text.
prs

Parameters

sIndenttext ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getMenuname

getMenu(index)

dessIndent
Get the submenu at the selected index (starting at 0).
prs

Parameters

sIndentindex ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getRadioButtonname

getRadioButton(index)

dessIndent
Get the radiobutton at the selected index (starting at 0).
prs

Parameters

sIndentindex ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
putClientPropertyname

putClientProperty(key, value)

dessIndent
Sets the value for the specified element client property key.
prs

Parameters

sIndentkey ;value ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeAllItemsname

removeAllItems()

dessIndent
Remove all items from the menu.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeItemname

removeItem(index)

dessIndent
Remove the item(s) at the selected index/indices.
prs

Parameters

sIndentindexarray of one or moe indexes corresponding to items to remove
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setEnabledname

setEnabled(boolean)

dessIndent
Set the the selected menu enabled or disabled.
prs

Parameters

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setIconname

setIcon(Object)

dessIndent
Set the icon of the menu.
prs

Parameters

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setMnemonicname

setMnemonic(String)

dessIndent
Set the mnemonic of the selected menu.
prs

Parameters

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow