Child pages
  • RadioButton

Versions Compared

Key

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

{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[StringBoolean]{td}{td}[#text#enabled]
{td}{tr}{tbody}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}voidObject[]{td}{td}[#doClick#methodArguments]\()
ScriptSet the selectionarguments (emulatethat acan mousebe click)read ofby the itemdefined method.{td}{tr}{tbody}{tbody}{tr}{td}void[String]{td}{td}[#set]\(text, method, selected, arguments, icon, key, mnemonic, enabled, visible)
Define the item with a text and a global method.#name]
{td}{tr}{tbody}{tbody}{tr}{td}void[Boolean]{td}{td}[#setAccelerator]\(key)
Set the accelerator key of the item.#selected]
{td}{tr}{tbody}{tbody}{tr}{td}void[String]{td}{td}[#setAlign#text]\()
{td}{tr}{tbody}{tbodytable}{tr\\ 

{table:class=servoy sSummery}{tdcolgroup}void{td}{td}[#setArguments]\(arguments)
Set the arguments that can be read by the defined method.{tdcolumn:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setEnabled#doClick]\(enabled)
Enable/disable()
Script the selection (emulate a mouse click) of the item.{td}{tr}{tbody}{tbody}{tr}{td}void[RadioButton]{td}{td}[#setIcon#setAccelerator]\(iconkey)
Set the accelerator iconkey of the item.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setMnemonic#setAlign]\(key)
Set the mnemonic key )
{td}{tr}{tbody}{tbody}{tr}{td}com.servoy.extensions.plugins.window.menu.AbstractMenuItem{td}{td}[#setIcon]\(icon)
Set the icon of the item.{td}{tr}{tbody}{tbody}{tr}{td}void[RadioButton]{td}{td}[#setSelected#setMethod]\(selectedmethod)
Set the item selectedmethod for the item.{td}{tr}{tbody}{tbody}{tr}{td}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{td}{td}[#setVisible#setMnemonic]\(visiblekey)
Set the item visiblemnemonic key of the item.{td}{tr}{tbody}{tabletbody}\\{table:class=servoy sDetail}{{tr}{td}com.servoy.extensions.plugins.window.menu.AbstractMenuItem{td}{td}[#setVisible]\(visible)
Set the item visible.{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494}{tr:id=name}{td}h6.textenabled{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_des|text=|trigger=button}{sub-section}{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_ret|text=|trigger=button}{sub-section}{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_ret|trigger=none|class=sIndent}[StringBoolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_see|text=|trigger=button}{sub-section}{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_see|text=|trigger=button}{sub-section}{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_sam|text=|trigger=button}{sub-section}{sub-section:EE1A76D4E3CDA117-82A4C0E4-48104021-8F33B233-A9732D2BA77BA3FF75FC4494_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=8ECC1746-DD2F-44FB-AB94-7DC097E714D3tbody:id=15901D7A-250B-4BFF-8F02-1F2AFF108D82}{tr:id=name}{td}h6.doClickmethodArguments{td}{tr}{tr:id=sigdes}{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;}\(){spansub-section:15901D7A-250B-4BFF-8F02-1F2AFF108D82_des|text=|trigger=button}{sub-section}{sub-section:15901D7A-250B-4BFF-8F02-1F2AFF108D82_des|trigger=none|class=sIndent}Set the arguments that can be read by the defined method.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{td}*Parameters*\\{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_desprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_desprs|trigger=none|class=sIndent}Script the selection (emulate a mouse click) of the item...{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_prsret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_prsret|trigger=none|class=sIndent}Object[]{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=retsee}{td}*ReturnsAlso see*\\{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_retsee|text=|trigger=button}{sub-section}{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D3_ret1F2AFF108D82_see|class=sIndent|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seelink}{td}*AlsoExternal seelinks*\\{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_see|text=|trigger=button}{sub-section}{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_seelink|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D31F2AFF108D82_seesam|text=|trigger=button}{sub-section}{sub-section:8ECC174615901D7A-DD2F250B-44FB4BFF-AB948F02-7DC097E714D3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8ECC1746-DD2F-44FB-AB94-7DC097E714D3_sam|text=|trigger=button}{sub-section}{sub-section:8ECC1746-DD2F-44FB-AB94-7DC097E714D3_sam1F2AFF108D82_sam|class=sIndent|trigger=none}{code:language=javascript}
//var Scriptmenu the selection (emulate a mouse click)= plugins.window.getMenu(2).getItem(0);
// Set the text of the item...
menu.setText("Servoy");
// ClickingSet athe separatormethod willfor throwthe an error!
plugins.menubar.getMenu(2).getItem(0).doClick();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9A380785-7361-4B12-8A29-5912E52968E7}{tr:id=name}{td}h6.set{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}set{span}{span:id=iets|style=float: left;}\(text, method, selected, arguments, icon, key, mnemonic, enabled, visible){span}{td}{tr}{tr:id=des}{td}{sub-section:9A380785-7361-4B12-8A29-5912E52968E7_des|text=|trigger=button}{sub-section}{sub-section:9A380785-7361-4B12-8A29-5912E52968E7_des|trigger=none|class=sIndent}Define the item with a text and a global method. Arguments, icon, accelerator, mnemonic key, visibility and enabling are optional...{item.
menu.setMethod(callback);
// Set the arguments that can be read by the defined method. - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.methodArguments = ["a","b"];
// Set the icon of the item.
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item.
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item.
menu.setMnemonic("e");
// Enable/disable the item.
menu.setEnabled(false);
// Set the item visible.
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:id=prsclass=lastDetailRow}{td}{td}*Parameters*\\{sub-section:9A380785-7361-4B12-8A29-5912E52968E7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{tr}{tbody}{tbody:id=3C1CBD0F-6A36-46EE-9FB4-B775CB9203A8}{tr:id=name}{td}h6.name{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:9A3807853C1CBD0F-73616A36-4B1246EE-8A299FB4-5912E52968E7_prsB775CB9203A8_des|text=|trigger=none}text
method
\[selected\]
\[arguments\]
\[icon\]
\[key\]
\[mnemonic\]
\[enabled\]
\[visible\]
button}{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:9A380785-7361-4B12-8A29-5912E52968E7_ret|text=|trigger=button}{sub-section}{sub-section:9A380785-7361-4B12-8A29-5912E52968E7_ret|trigger=sub-section:3C1CBD0F-6A36-46EE-9FB4-B775CB9203A8_des|trigger=none|class=sIndent}voidReplace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:9A3807853C1CBD0F-73616A36-4B1246EE-8A299FB4-5912E52968E7B775CB9203A8_seeprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9A3807853C1CBD0F-73616A36-4B1246EE-8A299FB4-5912E52968E7B775CB9203A8_seeprs|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:9A3807853C1CBD0F-73616A36-4B1246EE-8A299FB4-5912E52968E7B775CB9203A8_seeret|text=|trigger=button}{sub-section}{sub-section:9A3807853C1CBD0F-73616A36-4B1246EE-8A299FB4-5912E52968E7_linkB775CB9203A8_ret|trigger=none|class=sIndent|trigger=none}}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=samsee}{td}*SampleAlso see*\\{sub-section:9A3807853C1CBD0F-73616A36-4B1246EE-8A299FB4-5912E52968E7B775CB9203A8_samsee|text=|trigger=button}{sub-section}{sub-section:9A3807853C1CBD0F-73616A36-4B1246EE-8A299FB4-5912E52968E7B775CB9203A8_samsee|class=sIndent|trigger=none}{code:language=javascript}
// Define the item with a text and a global method. Arguments, icon, accelerator, mnemonic key, visibility and enabling are optional...
// get the menu at the last index
// indexes start at 0 (zero) so index 2 is in fact position 3
var menu = plugins.menubar.getMenu(plugins.menubar.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
var radiobutton = menu.addRadioButton();

// 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
radiobutton.set("radiobutton with feedback",feedback_radiobutton);

var radiobutton = menu.addRadioButton();
// set the radiobutton to selected
radiobutton.set("radiobutton selected",feedback_radiobutton, true);

var radiobutton = menu.addRadioButton();

// 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.set("radiobutton with input",feedback_radiobutton,false,input);

var radiobutton = menu.addRadioButton();
// add an icon to the item
radiobutton.set("radiobutton with icon",feedback_radiobutton,false,input,"media:///yourimage.gif");

var radiobutton = menu.addRadioButton();
// 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.set("radiobutton with accelerator",feedback_radiobutton,false,input,"media:///yourimage.gif","alt shift 3");

// add a separator at the last position or at a given index
menu.addSeparator();

// add a new Radiobutton group
menu.addRadioGroup();

var radiobutton = menu.addRadioButton();
// add a mnemonic key  ('i' in our example) which is the underlined shortkey on windows
// REMARK: setting the mnemonic key is platform dependent
radiobutton.set("radiobutton with mnemonic",feedback_radiobutton,false,input,"media:///yourimage.gif","a","i");

var radiobutton = menu.addRadioButton();
// disable the menu item
radiobutton.set("radiobutton disabled",feedback_radiobutton,false,input,"media:///yourimage.gif","control 3","t",false);

var radiobutton = menu.addRadioButton();
// set the menu item to be visible
radiobutton.set("radiobutton visible",feedback_radiobutton,true,input,"media:///yourimage.gif","meta 4","e",true,true);

var radiobutton = menu.addRadioButton();
// now the item is enabled and NOT visible
radiobutton.set("radiobutton invisible",feedback_radiobutton,false,input,"media:///yourimage.gif","alt 5","m",true,false);

// add a separator at the last position or at a given index
menu.addSeparator();

// WIZARD
// You can use the menubar wizard solution found in application_server/solutions/servoy_wizard_menubar.servoy to create your menu
// The wizard will help you at least to learn how to use the plugin and will help you to find the correct
// accelerator key string
{codesub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3C1CBD0F-6A36-46EE-9FB4-B775CB9203A8_see|text=|trigger=button}{sub-section}{sub-section:3C1CBD0F-6A36-46EE-9FB4-B775CB9203A8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:3C1CBD0F-6A36-46EE-9FB4-B775CB9203A8_sam|text=|trigger=button}{sub-section}{sub-section:3C1CBD0F-6A36-46EE-9FB4-B775CB9203A8_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E}{tr:id=name}{td}h6.selected{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_des|text=|trigger=button}{sub-section}{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_ret|text=|trigger=button}{sub-section}{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_see|text=|trigger=button}{sub-section}{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_see|text=|trigger=button}{sub-section}{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_sam|text=|trigger=button}{sub-section}{sub-section:F279E8C0-A12D-4D2D-A1E1-E97AA469ED6E_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77}{tr:id=name}{td}h6.setAcceleratortext{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setAccelerator{span}{span:id=iets|style=float: left;}\(key){span}{td}{trbuilder-show:permission=edit}{tr:id=des}{td}{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_des|text=|trigger=button}{sub-section}{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_des|trigger=none|class=sIndent}SetReplace the accelerator key of the item...with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_prs|trigger=none}key
{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_ret|text=|trigger=button}{sub-section}{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_ret|trigger=none|class=sIndent}void[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_see|text=|trigger=button}{sub-section}{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_see|text=|trigger=button}{sub-section}{sub-section:BF6B34594ADA56E6-ADEF507B-469746D6-81A99BC5-15ADC4063CBEF4576AAADF77_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BF6B3459-ADEF-4697-81A9-15ADC4063CBE_sam|text=|trigger=button}{sub-section}{sub-section:BF6B3459-ADEF-4697-81A9-15ADC4063CBE_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubar.getMenu(2).getRadioButton(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the item selected...
menu.setSelected(true);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 4, 5 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3E095D8A-8C42-489E-AD0A-A8410CEEEE09{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:4ADA56E6-507B-46D6-9BC5-F4576AAADF77_sam|text=|trigger=button}{sub-section}{sub-section:4ADA56E6-507B-46D6-9BC5-F4576AAADF77_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=778D956D-A755-4905-BD13-09DD3C580E14}{tr:id=name}{td}h6.setAligndoClick{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setAligndoClick{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_des|text=|trigger=button}{sub-section}{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_des|trigger=none|class=sIndent}Replace with descriptionScript the selection (emulate a mouse click) of the item.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_ret|text=|trigger=button}{sub-section}{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_see|text=|trigger=button}{sub-section}{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_see|text=|trigger=button}{sub-section}{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\}{tr:id=sam}{td}*Sample*\\{sub-section:778D956D-A755-4905-BD13-09DD3C580E14_sam|text=|trigger=button}{sub-section}{sub-section:3E095D8A778D956D-8C42A755-489E4905-AD0ABD13-A8410CEEEE0909DD3C580E14_sam|text=|trigger=button}{sub-section|class=sIndent|trigger=none}{code:language=javascript}
// Script the selection (emulate a mouse click) of the item.
// Clicking a separator will throw an error!
plugins.window.getMenu(2).getItem(0).doClick();
{code}{sub-section:3E095D8A-8C42-489E-AD0A-A8410CEEEE09_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD}{tr:id=name}{td}h6.setArgumentssetAccelerator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}setArgumentssetAccelerator{span}{span:id=iets|style=float: left;}\(argumentskey){span}{td}{tr}{tr:id=des}{td}{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_des|text=|trigger=button}{sub-section}{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_des|trigger=none|class=sIndent}Set the argumentsaccelerator thatkey can be read by the defined method...of the item.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_prs|trigger=none}argumentskey
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_ret|text=|trigger=button}{sub-section}{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_ret|trigger=none|class=sIndent}void[RadioButton]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_see|text=|trigger=button}{sub-section}{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_see|text=|trigger=button}{sub-section}{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_sam|text=|trigger=button}{sub-section}{sub-section:E117C31B21D3747F-EA5288A4-45944DA5-AF8D8FE4-3C789FA9610EB4D29FE87FCD_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubarwindow.getMenu(2).getRadioButtongetItem(0);
// Set the text of the item...
menu.setText("IT2BeServoy");
// Set the item selected...method for the item.
menu.setSelectedsetMethod(truecallback);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 45, 56 and so on to the callback method
menu.setArguments(methodArguments = ["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4")","b"];
// Set the mnemonicicon key of the item...
menu.setMnemonicsetIcon("emedia:///TipOfTheDay16.gif");
// Enable/disableSet the item...
menu.setEnabled(false);
// Set accelerator key of the item visible...
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=84358126-0E4A-46A3-8195-484B655FAAF2}{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){spansetAccelerator("meta 4");
// Set the mnemonic key of the item.
menu.setMnemonic("e");
// Enable/disable the item.
menu.setEnabled(false);
// Set the item visible.
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:id=desclass=lastDetailRow}{td}{td}{sub-section:84358126-0E4A-46A3-8195-484B655FAAF2_des|text=|trigger=button}{sub-section}{sub-section:84358126-0E4A-46A3-8195-484B655FAAF2_des|trigger=none|class=sIndent}Enable/disable the item...{sub-section}tr}{tbody}{tbody:id=A074625D-D2A9-4A05-B82E-E6D789D02222}{tr:id=name}{td}h6.setAlign{td}{tr}{tr:id=prssig}{td}*Parameters*\\{sub-section:84358126-0E4A-46A3-8195-484B655FAAF2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:84358126-0E4A-46A3-8195-484B655FAAF2_prs|trigger=none}enabled
{sub-section}{div{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setAlign{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=retdes}{td}*Returns*\\{sub-section:84358126A074625D-0E4AD2A9-46A34A05-8195B82E-484B655FAAF2E6D789D02222_retdes|text=|trigger=button}{sub-section}{sub-section:84358126A074625D-0E4AD2A9-46A34A05-8195B82E-484B655FAAF2E6D789D02222_retdes|trigger=none|class=sIndent}voidReplace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:84358126A074625D-0E4AD2A9-46A34A05-8195B82E-484B655FAAF2E6D789D02222_seeprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:84358126A074625D-0E4AD2A9-46A34A05-8195B82E-484B655FAAF2E6D789D02222_seeprs|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:84358126A074625D-0E4AD2A9-46A34A05-8195B82E-484B655FAAF2E6D789D02222_seeret|text=|trigger=button}{sub-section}{sub-section:84358126A074625D-0E4AD2A9-46A34A05-8195B82E-484B655FAAF2_linkE6D789D02222_ret|trigger=none|class=sIndent|trigger=none}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=samsee}{td}*SampleAlso see*\\{sub-section:84358126-0E4A-46A3-8195-484B655FAAF2_sam|text=|trigger=button}{sub-section}{sub-section:84358126A074625D-0E4AD2A9-46A34A05-8195B82E-484B655FAAF2E6D789D02222_samsee|classtext=sIndent|trigger=nonebutton}{code:language=javascript}
var menu = plugins.menubar.getMenu(2).getRadioButton(0);
// Set the text of the item...
menu.setText("IT2Be");
// Set the item selected...
menu.setSelected(true);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 4, 5 and so on to the callback method
menu.setArguments(["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
{codesub-section}{sub-section:A074625D-D2A9-4A05-B82E-E6D789D02222_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A074625D-D2A9-4A05-B82E-E6D789D02222_see|text=|trigger=button}{sub-section}{sub-section:A074625D-D2A9-4A05-B82E-E6D789D02222_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:A074625D-D2A9-4A05-B82E-E6D789D02222_sam|text=|trigger=button}{sub-section}{sub-section:A074625D-D2A9-4A05-B82E-E6D789D02222_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E}{tr:id=name}{td}h6.setIcon{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{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:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_des|text=|trigger=button}{sub-section}{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_des|trigger=none|class=sIndent}Set the icon of the item...{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_prs|trigger=none}icon
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_ret|text=|trigger=button}{sub-section}{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_ret|trigger=none|class=sIndent}void|class=sIndent}com.servoy.extensions.plugins.window.menu.AbstractMenuItem{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_see|text=|trigger=button}{sub-section}{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_see|text=|trigger=button}{sub-section}{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_sam|text=|trigger=button}{sub-section}{sub-section:A47C5806B5158BA6-0E4678DF-4BC04F50-8BA7BD65-7AE2C4A453C48E57F5415B1E_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubarwindow.getMenu(2).getRadioButtongetItem(0);
// Set the text of the item...
menu.setText("IT2BeServoy");
// Set the method for the item selected...
menu.setSelectedsetMethod(truecallback);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 45, 56 and so on to the callback method
menu.setArguments(methodArguments = ["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602}{tr:id=name}{td}h6.setMnemonicsetMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[RadioButton]{span}{span:id=iets|style=float: left; font-weight: bold;}setMnemonicsetMethod{span}{span:id=iets|style=float: left;}\(keymethod){span}{td}{tr}{tr:id=des}{td}{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_des|text=|trigger=button}{sub-section}{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_des|trigger=none|class=sIndent}Set the mnemonicmethod key offor the item...{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_prs|trigger=none}keymethod
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_ret|text=|trigger=button}{sub-section}{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_ret|trigger=none|class=sIndent}void[RadioButton]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_see|text=|trigger=button}{sub-section}{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_see|text=|trigger=button}{sub-section}{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_sam|text=|trigger=button}{sub-section}{sub-section:5E6422384AFE2003-491314BC-41CA4C84-88F59532-AD3FF05D5E9AA3C8FEA27602_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubarwindow.getMenu(2).getRadioButtongetItem(0);
// Set the text of the item...
menu.setText("IT2BeServoy");
// Set the method item selected...for the item.
menu.setSelectedsetMethod(truecallback);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 45, 56 and so on to the callback method
menu.setArguments(methodArguments = ["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D}{tr:id=name}{td}h6.setSelectedsetMnemonic{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setSelected{span}{span:id=iets|style=float: left;}\(selected){spancom.servoy.extensions.plugins.window.menu.AbstractMenuItem{span}{span:id=iets|style=float: left; font-weight: bold;}setMnemonic{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=des}{td}{sub-section:2717D86D-57DE-4C4E-8FD8-BB698EB19E9D_des|text=|trigger=button}{sub-section}{sub-section:2717D86D-57DE-4C4E-8FD8-BB698EB19E9D_des|trigger=none|class=sIndent}Set the mnemonic key of the item.{sub-section}{td}{tr}{tr:id=desprs}{td}*Parameters*\\{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_desprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_desprs|trigger=none|class=sIndent}Set the item selected...key
{sub-section}{div}{td}{tr}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_prsret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_prsret|trigger=none}selected
|class=sIndent}com.servoy.extensions.plugins.window.menu.AbstractMenuItem{sub-section}{divtd}{tdtr}{trbuilder-show:permission=edit}{tr:id=retsee}{td}*ReturnsAlso see*\\{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_retsee|text=|trigger=button}{sub-section}{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CE_retBB698EB19E9D_see|class=sIndent|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seelink}{td}*AlsoExternal seelinks*\\{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_see|text=|trigger=button}{sub-section}{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_seelink|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:2717D86D-57DE-4C4E-8FD8-BB698EB19E9D_sam|text=|trigger=button}{sub-section}{sub-section:7DE31ED62717D86D-4BA857DE-49344C4E-B07E8FD8-B486A7B5A3CEBB698EB19E9D_seesam|textclass=sIndent|trigger=buttonnone}{sub-section}{sub-section:7DE31ED6-4BA8-4934-B07E-B486A7B5A3CE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7DE31ED6-4BA8-4934-B07E-B486A7B5A3CE_sam|text=|trigger=button}{sub-section}{sub-section:7DE31ED6-4BA8-4934-B07E-B486A7B5A3CE_sam|class=sIndent|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show}{code:language=javascript}
var menu = plugins.window.getMenu(2).getItem(0);
// Set the text of the item.
menu.setText("Servoy");
// Set the method for the item.
menu.setMethod(callback);
// Set the arguments that can be read by the defined method. - array elements will be passed as arguments 5, 6 and so on to the callback method
menu.methodArguments = ["a","b"];
// Set the icon of the item.
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item.
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item.
menu.setMnemonic("e");
// Enable/disable the item.
menu.setEnabled(false);
// Set the item visible.
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{span}{span:id=iets|style=float: left; font-weight: bold;}setVisible{span}{span:id=iets|style=float: left;}\(visible){span}{td}{tr}{tr:id=des}{td}{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_des|text=|trigger=button}{sub-section}{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_des|trigger=none|class=sIndent}Set the item visible...{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_prs|trigger=none}visible
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_ret|text=|trigger=button}{sub-section}{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_ret|trigger=none|class=sIndent}voidcom.servoy.extensions.plugins.window.menu.AbstractMenuItem{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_see|text=|trigger=button}{sub-section}{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_see|text=|trigger=button}{sub-section}{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_sam|text=|trigger=button}{sub-section}{sub-section:1F5CD5977C4B1490-F836B793-4A8F41D9-ACF5913C-96C67DE1A527BDA85157119F_sam|class=sIndent|trigger=none}{code:language=javascript}
var menu = plugins.menubarwindow.getMenu(2).getRadioButtongetItem(0);
// Set the text of the item...
menu.setText("IT2BeServoy");
// Set the method item selected...for the item.
menu.setSelectedsetMethod(truecallback);
// Set the arguments that can be read by the defined method... - array elements will be passed as arguments 45, 56 and so on to the callback method
menu.setArguments(methodArguments = ["a","b"]);
// Set the icon of the item...
menu.setIcon("media:///TipOfTheDay16.gif");
// Set the accelerator key of the item...
menu.setAccelerator("meta 4");
// Set the mnemonic key of the item...
menu.setMnemonic("e");
// Enable/disable the item...
menu.setEnabled(false);
// Set the item visible...
menu.setVisible(true);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}