Child pages
  • MenuItem

Versions Compared

Key

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

{table:id=|class=servoy sSummerysSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants SummerySummary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#ALIGN_CENTER]
{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#ALIGN_LEFT]
{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#ALIGN_RIGHT]
{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummerysSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property SummerySummary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#enabled]
{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#methodArguments]
Set the arguments that can be read by the defined method.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name]
{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#selected]
{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#text]
{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummerysSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method SummerySummary{th}{tr}{tbody}{tr}{td}void{td}{td}[#doClick]\()
Script the selection (emulate a mouse click) of the item.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItemObject]{td}{td}[#setAccelerator#getClientProperty]\(key)
SetGets the specified acceleratorclient keyproperty offor the item element based on a key.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]void{td}{td}[#setIcon#putClientProperty]\(iconkey, value)
SetSets the iconvalue offor the itemspecified element client property key.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setMethod#setAccelerator]\(methodkey)
Set the methodaccelerator key forof the item.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]void{td}{td}[#setMnemonic#setBackgroundColor]\(keybackgroundColor)
Set the mnemonicbackground keycolor of the item.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]void{td}{td}[#setVisible#setForegroundColor]\(visibleforegroundColor)
Set the foreground color of the item visible.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=ALIGN_CENTER|class=node}{tr:id=name}{td}h6.ALIGN_CENTERtbody}{tr}{td}[MenuItem]{td}{td}[#setIcon]\(icon)
Set the icon of the item.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setMethod]\(method)
Set the method for the item.{td}{tr}{builder-show:permission=edittbody}{tr:id=destbody}{tr}{td}{sub-section:ALIGN_CENTER_des|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_des|trigger=none|class=sIndent}Replace with description{sub-section}[MenuItem]{td}{td}[#setMnemonic]\(key)
Set the mnemonic key of the item.{td}{tr}{builder-showtbody}{builder-show:permission=edittbody}{tr:id=snc}{td}*Since*\\{sub-section:ALIGN_CENTER_snc|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{[MenuItem]{td}{td}[#setVisible]\(visible)
Set the item visible.{td}{tr}{builder-showtbody}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:ALIGN_CENTER_prs|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-showtable}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=ALIGN_CENTER|class=node}{tr:id=name}{td}h6.ALIGN_CENTER{td}{tr}{builder-show:permission=edit}{tr:id=retdes}{td}*Returns*\\{sub-section:ALIGN_CENTER_retdes|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_retdes|trigger=none|class=sIndent}[Number]Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seesnc}{td}*Also seeSince*\\{sub-section:ALIGN_CENTER_seesnc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_seesnc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:ALIGN_CENTER_linkprs|text=|trigger=button}{sub-section}{div:class=sIndent}sub-section:ALIGN_CENTER_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ALIGN_CENTER_linkret|text=|trigger=nonebutton}{sub-section}{sub-section:ALIGN_CENTER_ret|trigger=none|class=sIndent}{div[Number]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samsee}{td}*SampleAlso see*\\{sub-section:ALIGN_CENTER_samsee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_samsee|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{trbuilder-show:classpermission=lastDetailRowedit}{tdtr:id=link}{td}{tr}{tbody}{tbody:id=ALIGN_LEFT|class=node}{tr:id=name}{td}h6.ALIGN_LEFT{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{*External links*\\{sub-section:ALIGN_LEFTCENTER_deslink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFTCENTER_deslink|trigger=none|class=sIndent}Replace with description{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:ALIGN_LEFTCENTER_sncsam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFTCENTER_sncsam|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_LEFT|class=node}{tr:id=name}{td}h6.ALIGN_LEFT{td}{tr}{builder-show:permission=edit}{tr:id=prsdes}{td}*Parameters*\\{sub-section:ALIGN_LEFT_prsdes|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_prsdes|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retsnc}{td}*ReturnsSince*\\{sub-section:ALIGN_LEFT_retsnc|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_retsnc|trigger=none|class=sIndent}[Number] Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:ALIGN_LEFT_seeprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ALIGN_LEFT_seeret|text=|trigger=nonebutton}{sub-section}{divsub-section:ALIGN_LEFT_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:ALIGN_LEFT_linksee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_linksee|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:ALIGN_LEFT_samlink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_samlink|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{trbuilder-show:classpermission=lastDetailRowedit}{tdtr:id=sam}{td}*Sample*\\{sub-section:ALIGN_LEFT_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_RIGHT|class=node}{tr:id=name}{td}h6.ALIGN_RIGHT{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ALIGN_RIGHT_des|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_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:ALIGN_RIGHT_snc|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_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:ALIGN_RIGHT_prs|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ALIGN_RIGHT_ret|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ALIGN_RIGHT_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ALIGN_RIGHT_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:ALIGN_RIGHT_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_RIGHT_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{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=enabled|class=node}{tr:id=name}{td}h6.enabled{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:enabled_des|text=|trigger=button}{sub-section}{sub-section:enabled_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:enabled_snc|text=|trigger=button}{sub-section}{sub-section:enabled_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:enabled_prs|text=|trigger=button}{sub-section}{sub-section:enabled_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:enabled_ret|text=|trigger=button}{sub-section}{sub-section:enabled_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:enabled_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:enabled_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:enabled_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:enabled_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=methodArguments|class=node}{tr:id=name}{td}h6.methodArguments{td}{tr}{tr:id=des}{td}{sub-section:methodArguments_des|text=|trigger=button}{sub-section}{sub-section:methodArguments_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=snc}{td}*Since*\\{sub-section:methodArguments_snc|text=|trigger=button}{sub-section}{sub-section:methodArguments_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:methodArguments_prs|text=|trigger=button}{sub-section}{sub-section:methodArguments_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:methodArguments_ret|text=|trigger=button}{sub-section}{sub-section:methodArguments_ret|trigger=none|class=sIndent}[Object]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:methodArguments_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArguments_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:methodArguments_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArguments_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:methodArguments_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:methodArguments_sam|trigger=none}{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"];
//The Setfirst the5 iconarguments ofare thefixed: item.
menu.setIcon("media:///TipOfTheDay16.//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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}{div
menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=name|class=node}{tr:id=name}{td}h6.name{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:name_des|text=|trigger=button}{sub-section}{sub-section:name_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:name_snc|text=|trigger=button}{sub-section}{sub-section:name_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:name_prs|text=|trigger=button}{sub-section}{sub-section:name_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:name_ret|text=|trigger=button}{sub-section}{sub-section:name_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:name_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:name_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:name_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:name_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:name_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:name_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selected|class=node}{tr:id=name}{td}h6.selected{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:selected_des|text=|trigger=button}{sub-section}{sub-section:selected_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:selected_snc|text=|trigger=button}{sub-section}{sub-section:selected_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:selected_prs|text=|trigger=button}{sub-section}{sub-section:selected_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:selected_ret|text=|trigger=button}{sub-section}{sub-section:selected_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:selected_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:selected_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:selected_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:selected_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{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=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;}\(){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 item.{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}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:doClick_prs|text=|trigger=button}{sub-section}{sub-section:doClick_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{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)}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getClientProperty|class=node}{tr:id=name}{td}h6.getClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getClientProperty{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=des}{td}{sub-section:getClientProperty_des|text=|trigger=button}{sub-section}{sub-section:getClientProperty_des|trigger=none|class=sIndent}Gets the specified client property for the element based on a key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:getClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:getClientProperty_prs|trigger=none|class=sIndent}key
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:getClientProperty_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientProperty_sam|trigger=none}{code:language=javascript}
// Gets the specified client property for the element based on a key.
// NOTE: Depending on the operating system, a user interface property name may be available.
var property = plugins.window.getClientProperty('ToolTipText');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=putClientProperty|class=node}{tr:id=name}{td}h6.putClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}putClientProperty{span}{span:id=iets|style=float: left;}\(key, value){span}{td}{tr}{tr:id=des}{td}{sub-section:putClientProperty_des|text=|trigger=button}{sub-section}{sub-section:putClientProperty_des|trigger=none|class=sIndent}Sets the value for the specified element client property key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:putClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:putClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:putClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:putClientProperty_prs|trigger=none|class=sIndent}key
value
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:putClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:putClientProperty_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:putClientProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putClientProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:putClientProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putClientProperty_sam|trigger=none}{code:language=javascript}
// Sets the value for the specified element client property key.
// NOTE: Depending on the operating system, a user interface property name may be available.
plugins.window.putClientProperty('ToolTipText','some text');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAccelerator|class=node}{tr:id=name}{td}h6.setAccelerator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}setAccelerator{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{tr:id=des}{td}{sub-section:setAccelerator_des|text=|trigger=button}{sub-section}{sub-section:setAccelerator_des|trigger=none|class=sIndent}Set the accelerator key of the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAccelerator_snc|text=|trigger=button}{sub-section}{sub-section:setAccelerator_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setAccelerator_prs|text=|trigger=button}{sub-section}{sub-section:setAccelerator_prs|trigger=none|class=sIndent}key
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setAccelerator_ret|text=|trigger=button}{sub-section}{sub-section:setAccelerator_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAccelerator_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setAccelerator_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setAccelerator_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAccelerator_sam|trigger=none}{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
//The first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setBackgroundColor|class=node}{tr:id=name}{td}h6.setBackgroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setBackgroundColor{span}{span:id=iets|style=float: left;}\(backgroundColor){span}{td}{tr}{tr:id=des}{td}{sub-section:setBackgroundColor_des|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_des|trigger=none|class=sIndent}Set the background color of the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setBackgroundColor_snc|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setBackgroundColor_prs|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_prs|trigger=none|class=sIndent}backgroundColor
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setBackgroundColor_ret|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setBackgroundColor_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColor_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setBackgroundColor_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColor_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setBackgroundColor_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setBackgroundColor_sam|trigger=none}{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
//The first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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 Clickingthe a separator will throw an error!
plugins.window.getMenu(2).getItem(0).doClick(item.
menu.setEnabled(false);
// Set the item visible.
menu.setVisible(true);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAcceleratorsetForegroundColor|class=node}{tr:id=name}{td}h6.setAcceleratorsetForegroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]void{span}{span:id=iets|style=float: left; font-weight: bold;}setAcceleratorsetForegroundColor{span}{span:id=iets|style=float: left;}\(keyforegroundColor){span}{td}{tr}{tr:id=des}{td}{sub-section:setAcceleratorsetForegroundColor_des|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetForegroundColor_des|trigger=none|class=sIndent}Set the acceleratorforeground keycolor of the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAcceleratorsetForegroundColor_snc|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetForegroundColor_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setAcceleratorsetForegroundColor_prs|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetForegroundColor_prs|trigger=none|class=sIndent}keyforegroundColor
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setAcceleratorsetForegroundColor_ret|text=|trigger=button}{sub-section}{sub-section:setAcceleratorsetForegroundColor_ret|trigger=none|class=sIndent}[MenuItem]void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAcceleratorsetForegroundColor_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAcceleratorsetForegroundColor_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setAcceleratorsetForegroundColor_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAcceleratorsetForegroundColor_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setAcceleratorsetForegroundColor_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAcceleratorsetForegroundColor_sam|trigger=none}{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 arguments 5, 6 and so on to the callback method
//The first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{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;}[MenuItem]{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 item.{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}[MenuItem]{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}{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 6 and so on to the callback method
//The first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setMethod|class=node}{tr:id=name}{td}h6.setMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{span}{span:id=iets|style=float: left; font-weight: bold;}setMethod{span}{span:id=iets|style=float: left;}\(method){span}{td}{tr}{tr:id=des}{td}{sub-section:setMethod_des|text=|trigger=button}{sub-section}{sub-section:setMethod_des|trigger=none|class=sIndent}Set the method for the item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setMethod_snc|text=|trigger=button}{sub-section}{sub-section:setMethod_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setMethod_prs|text=|trigger=button}{sub-section}{sub-section:setMethod_prs|trigger=none|class=sIndent}method
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setMethod_ret|text=|trigger=button}{sub-section}{sub-section:setMethod_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setMethod_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMethod_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setMethod_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMethod_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setMethod_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setMethod_sam|trigger=none}{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 6 and so on to the callback method
//The first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{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;}[MenuItem]{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:setMnemonic_des|text=|trigger=button}{sub-section}{sub-section:setMnemonic_des|trigger=none|class=sIndent}Set the mnemonic key of the item.{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}key
{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}[MenuItem]{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}
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
//The first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setVisible|class=node}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItem]{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:setVisible_des|text=|trigger=button}{sub-section}{sub-section:setVisible_des|trigger=none|class=sIndent}Set the item visible.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setVisible_snc|text=|trigger=button}{sub-section}{sub-section:setVisible_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setVisible_prs|text=|trigger=button}{sub-section}{sub-section:setVisible_prs|trigger=none|class=sIndent}visible
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setVisible_ret|text=|trigger=button}{sub-section}{sub-section:setVisible_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setVisible_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setVisible_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setVisible_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_sam|trigger=none}{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
//The first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
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);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}