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 sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{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 sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{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 sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}void{td}{td}[#doClick]\()
Script the selection (emulate a mouse click) of the item.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getClientProperty]\(key)
Gets the specified client property for the element based on a key.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#putClientProperty]\(key, value)
Sets the value for the specified element client property key.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setAccelerator]\(key)
Set the accelerator key of the item.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setBackgroundColor]\(backgroundColor)
Set the background color of the item.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setForegroundColor]\(foregroundColor)
Set the foreground color of the item.{td}{tr}{tbody}{tbody}{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}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setMnemonic]\(key)
Set the mnemonic key of the item.{td}{tr}{tbody}{tbody}{tr}{td}[MenuItem]{td}{td}[#setVisible]\(visible)
Set 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_CENTER{td}{tr}{builder-show:permission=edit}{tr:id=des}{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}{td}{tr}{builder-show}{builder-show:permission=editReplace with description{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\{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[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{builder-show}{builder-show:permission=edittr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:ALIGN_CENTER_prs|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_prs|trigger=none|class=sIndent}{sub-sectiondiv:class=sIndent}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{trtbody:id=ret}{td}*Returns*\\{sub-section:ALIGN_CENTER_retLEFT|text=|trigger=button}{sub-section}{sub-section:ALIGN_CENTER_ret|trigger=none|class=sIndent}[Number]{sub-section}class=node}{tr:id=name}{td}h6.ALIGN_LEFT{td}{tr}{builder-showtr:permissionid=editdes}{trtd}Replace with description{td}{tr}{tr:id=seesnc}{td}*Also seeSince*\\{sub-section:ALIGN_CENTER_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:ALIGN_CENTER_link|text=|trigger=button}{sub-section}div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{sub-section:ALIGN_CENTER_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:ALIGN_CENTER_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_CENTER_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{div:class=sIndent}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_LEFTRIGHT|class=node}{tr:id=name}{td}h6.ALIGN_LEFTRIGHT{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ALIGN_LEFT_des|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{tr:id=snc}{td}*Since*\\{sub-section:ALIGN_LEFT_snc|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_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_LEFT_prs|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-showtd}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=retsee}{td}*ReturnsAlso see*\\{sub-section:ALIGN_LEFT_ret|text=|trigger=button}{sub-section}{sub-section:ALIGN_LEFT_ret|trigger=none|div:class=sIndent}[Number]{sub-section{div}{td}{tr}{builder-show:permission=edit}{tr:id=seelink}{td}*AlsoExternal seelinks*\\{sub-section:ALIGN_LEFT_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_see|trigger=none}{sub-sectiondiv:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ALIGN_LEFT_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ALIGN_LEFT_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr: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}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}{tr:id=des}{td}Replace with description{td}{tr}{tbody}{tbody:id=ALIGN_RIGHT|class=nodetr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=nameprs}{td}h6.ALIGN_RIGHT*Parameters*\\{td}{tr}{builder-showtr:permissionid=editret}{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-sectiontd}*Returns*\\[Boolean]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{builder-show}{builder-show:permission=edittr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:ALIGN_RIGHT_snc|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{builder-show:permission=edittbody:id=methodArguments|class=node}{tr:id=prsname}{td}*Parameters*\\{sub-section:ALIGN_RIGHT_prs|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_prs|trigger=none|class=sIndent}{sub-section}h6.methodArguments{td}{tr}{tr:id=des}{td}Set the arguments that can be read by the defined method.{td}{tr}{builder-show}{tr:id=retsnc}{td}*ReturnsSince*\\{sub-section:ALIGN_RIGHT_ret|text=|trigger=button}{sub-section}{sub-section:ALIGN_RIGHT_ret|trigger=none|class=sIndent}[Number]{sub-section} Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{builder-showtr:permission=editid=ret}{td}*Returns*\\[Object]\[]{td}{tr}{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: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
//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=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) of the item.
// Clicking a separator will throw an error!
plugins.window.getMenu(2).getItem(0).doClick();
{code}{sub-sectioncode: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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=name|class=node}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=lastDetailRowsIndent}{tddiv}{td}{tr}{tbody}{tbodytr:id=getClientProperty|class=node}{tr:id=name}{td}h6.getClientPropertysam}{td}*Sample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sigclass=lastDetailRow}{td}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{spantr}{tbody}{tbody:id=ietsselected|style=float: left; font-weight: bold;}getClientProperty{span}{span:id=iets|style=float: left;}\(key){span}class=node}{tr:id=name}{td}h6.selected{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=editReplace with description{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:getClientProperty_snc|text=|trigger=button}{sub-section}{sub-section:getClientProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section[Boolean]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{builder-show}{tr:id=prslink}{td}*ParametersExternal links*\\{sub-section:getClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:getClientProperty_prs|trigger=none|div:class=sIndent}key
{sub-sectiondiv}{td}{tr}{tr:id=retsam}{td}*ReturnsSample*\\{sub-section:getClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:getClientProperty_ret|trigger=none|div:class=sIndent}[Object]{sub-section{div}{td}{tr}{builder-showtr:permissionclass=editlastDetailRow}{tr:id=seetd}{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}{tbody}{tbody:id=text|class=node}{tr:id=name}{td}h6.text{td}{tr}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=samprs}{td}*SampleParameters*\\{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}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tbody}{tbodytr:id=putClientProperty|class=node}{tr:id=name}{td}h6.putClientPropertylink}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{spandiv: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){spanclass=sIndent}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{trtbody}{table}\\ 

{table:id=desfunction|class=servoy sDetail}{tdcolgroup}{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=editcolumn: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=sncsig}{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{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}Script the selection (emulate a mouse click) of the item.{td}{tr}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:putClientProperty_prs|text=|trigger=button}{sub-section}{sub-section:putClientProperty_prs|trigger=none|class=sIndent}key
value
{sub-section} Replace with version info{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:putClientProperty_ret|text=|trigger=button}{sub-section}{sub-section:putClientProperty_ret|trigger=none|class=sIndent}void{sub-section}td}{tr}{tr:id=ret}{td}*Returns*\\void{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=edittr}{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}
// SetsScript the valueselection for(emulate thea specifiedmouse elementclick) clientof propertythe keyitem.
// NOTE: Depending on the operating system,Clicking a userseparator interfacewill propertythrow namean may be available.
error!
plugins.window.putClientProperty('ToolTipText','some text'.getMenu(2).getItem(0).doClick();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAcceleratorgetClientProperty|class=node}{tr:id=name}{td}h6.setAcceleratorgetClientProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MenuItemObject]{span}{span:id=iets|style=float: left; font-weight: bold;}setAccelerator{span}getClientProperty{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:id=iets|style=float: left;}\(key){span}{td}{tr}{builder-show:permission=edit}{tr:id=sncdes}{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}Gets the specified client property for the element based on a key.{td}{tr}{builder-show}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:setAccelerator_prs|text=|trigger=button}{sub-section}{sub-section:setAccelerator_prs|trigger=none|class=sIndent}key
{sub-section} Replace with version info{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:setAccelerator_ret|text=|trigger=button}{sub-section}{sub-section:setAccelerator_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}key
{td}{tr}{builder-showtr:permission=editid=ret}{td}*Returns*\\[Object]{td}{tr}{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:class=sIndent}{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}
// varGets menuthe = plugins.window.getMenu(2).getItem(0);
// Setspecified client property for the textelement ofbased theon item.a menu.setText("Servoy");key.
// SetNOTE: theDepending methodon 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('#0000ffoperating system, a user interface property name may be available.
var property = plugins.window.getClientProperty('ToolTipText');
{code}{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}Sets the value for the specified element client property key.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\key
value
{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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=setBackgroundColorsetAccelerator|class=node}{tr:id=name}{td}h6.setBackgroundColorsetAccelerator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[MenuItem]{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-weight: bold;}setAccelerator{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{builder-show:permission=edit}{tr:id=sncdes}{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}{Set the accelerator key of the item.{td}{tr}{builder-show}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:setBackgroundColor_prs|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_prs|trigger=none|class=sIndent}backgroundColor
{sub-section}{ Replace with version info{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:setBackgroundColor_ret|text=|trigger=button}{sub-section}{sub-section:setBackgroundColor_ret|trigger=none|class=sIndent}void{sub-section}key
{td}{tr}{tr:id=ret}{td}*Returns*\\[MenuItem]{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:class=sIndent}{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 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=setForegroundColorsetBackgroundColor|class=node}{tr:id=name}{td}h6.setForegroundColorsetBackgroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setForegroundColor{span}{span:id=iets|style=float: left;}\(foregroundColor){span}{td}{tr}{tr:id=des}{td}{sub-section:setForegroundColor_des|text=|trigger=button}{sub-section}{sub-section:setForegroundColor_des|trigger=none|class=sIndent}Set the foreground color of the item.{sub-section;}setBackgroundColor{span}{span:id=iets|style=float: left;}\(backgroundColor){span}{td}{tr}{builder-show:permission=edit}{tr:id=sncdes}{td}*Since*\\{sub-section:setForegroundColor_snc|text=|trigger=button}{sub-section}{sub-section:setForegroundColor_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{Set the background color of the item.{td}{tr}{builder-show}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:setForegroundColor_prs|text=|trigger=button}{sub-section}{sub-section:setForegroundColor_prs|trigger=none|class=sIndent}foregroundColor
{sub-section}{ Replace with version info{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:setForegroundColor_ret|text=|trigger=button}{sub-section}{sub-section:setForegroundColor_ret|trigger=none|class=sIndent}void{sub-sectionbackgroundColor
{td}{tr}{tr:id=ret}{td}{tr}{builder-show:permission=edit*Returns*\\void{td}{tr}{tr:id=see}{td}*Also see*\\{sub-section:setForegroundColor_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setForegroundColor_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setForegroundColor_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setForegroundColor_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setForegroundColor_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setForegroundColor_sam|trigger=none}{code:language=javascript}
var menu = plugins.window.getMenu(2).getItem(0div:class=sIndent}{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 textkey of the item.
menu.setTextsetAccelerator("Servoymeta 4");
// Set the methodmnemonic key forof the item.
menu.setMethodsetMnemonic(callback"e");
// SetEnable/disable the arguments that can be read byitem.
menu.setEnabled(false);
// Set the defineditem methodvisible.
- 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"]menu.setVisible(true);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setForegroundColor|class=node}{tr:id=name}{td}h6.setForegroundColor{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setForegroundColor{span}{span:id=iets|style=float: left;}\(foregroundColor){span}{td}{tr}{tr:id=des}{td}Set the foreground color of the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\foregroundColor
{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var menu = plugins.window.getMenu(2).getItem(0);
// Set the icontext of the item.
menu.setIconsetText("media:///TipOfTheDay16.gifServoy");
// Set the acceleratormethod keyfor of the item.
menu.setAccelerator("meta 4"setMethod(callback);
// 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 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}{div}{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:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setIcon|class=node}{tr:id=name}{td}h6.setIcon{td}{tr}{tr:id=prssig}{td}*Parameters*\\{sub-section:setIcon_prs|text=|trigger=button}{sub-section}{sub-section:setIcon_prs|trigger=none|class=sIndent}icon
{sub-section{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=retdes}{td}*Returns*\\{sub-section:setIcon_ret|text=|trigger=button}{sub-section}{sub-section:setIcon_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}Set the icon of the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:setIcon_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setIcon_see|trigger=none}{sub-section}{div}{icon
{td}{tr}{tr:id=ret}{td}*Returns*\\[MenuItem]{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:setIcon_link|text=|trigger=button}{sub-section}div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{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
//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.setForegroundColorsetEnabled('#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){spanfalse);
// Set the item visible.
menu.setVisible(true);

menu.setBackgroundColor('#ff0000');

menu.setForegroundColor('#0000ff');
{code}{div}{td}{tr}{tr:id=desclass=lastDetailRow}{td}{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=edittr}{tbody}{tbody:id=setMethod|class=node}{tr:id=name}{td}h6.setMethod{td}{tr}{tr:id=sncsig}{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{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}{builder-show}{tr:id=prsdes}{td}*Parameters*\\{sub-section:setMethod_prs|text=|trigger=button}{sub-section}{sub-section:setMethod_prs|trigger=none|class=sIndent}method
{sub-section}Set the method for the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{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=editmethod
{td}{tr}{tr:id=ret}{td}*Returns*\\[MenuItem]{td}{tr}{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
//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: bold;}setMnemonic{span}{span:id=iets|style=float: left;}\(key){span}{td}{tr}{builder-show:permission=edit}{tr:id=sncdes}{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-showSet the mnemonic key of the item.{td}{tr}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:setMnemonic_prs|text=|trigger=button}{sub-section}{sub-section:setMnemonic_prs|trigger=none|class=sIndent}key
{sub-section}{ Replace with version info{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:setMnemonic_ret|text=|trigger=button}{sub-section}{sub-section:setMnemonic_ret|trigger=none|class=sIndent}[MenuItem]{sub-section}key
{td}{tr}{tr:id=ret}{td}*Returns*\\[MenuItem]{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}td}*External links*\\{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 itemmnemonic 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){spankey 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}{div}{td}{tr}{tr:id=desclass=lastDetailRow}{td}{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=edittr}{tbody}{tbody:id=setVisible|class=node}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=sncsig}{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{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}{builder-show}{tr:id=prsdes}{td}*Parameters*\\{sub-section:setVisible_prs|text=|trigger=button}{sub-section}{sub-section:setVisible_prs|trigger=none|class=sIndent}visible
{sub-section}Set the item visible.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{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=editvisible
{td}{tr}{tr:id=ret}{td}*Returns*\\[MenuItem]{td}{tr}{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:class=sIndent}{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}