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}
\\ 

{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}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Number]{td}{tr}{tr:idclass=prslastDetailRow}{td}*Parameters*\\{td}{tr}{tbody}{tbody:id=ALIGN_LEFT|class=node}{tr:id=retname}{td}*Returns*\\[Number]h6.ALIGN_LEFT{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}{Replace with description{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent [Number]{td}{divtr}{td}{tr}{tr:id=sam}{td}*Sample*\\{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}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Number]{td}{tr}{tr:idclass=prslastDetailRow}{td}*Parameters*\\{td}{tr}{tr:id=rettbody}{tdtable}*Returns*\\[Number]{td}{tr}{tr 

{table:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{trproperty|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{tdstyle=height: 30px;}{th:colspan=1}Property Details{th}{tr}{trtbody:id=enabled|class=samnode}{td}*Sample*\\{div:class=sIndent}{div}tr:id=name}{td}h6.enabled{td}{tr}{tr:classid=lastDetailRowdes}{td}Replace with description{td}{tr}{tr:id=ret}{td}*Returns*\\ [Boolean]{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ALIGN_RIGHTmethodArguments|class=node}{tr:id=name}{td}h6.ALIGN_RIGHTmethodArguments{td}{tr}{tr:id=des}{td}Replace with descriptionSet the arguments that can be read by the defined method.{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Object]\[]{td}{tr}{tr:id=prssam}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also seeSample*\\{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}{div}{td}{tr}{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}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Boolean]{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=methodArguments|class=node}{tr:id=name}{td}h6.methodArguments{td}{tr}{tr:id=des}{td}Set the arguments that can be read by the defined method.{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*\\[Object]\[]{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 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=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selected|class=node}{tr:id=name}{td}h6.selected{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*\\[Boolean]{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=sIndentcode: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=textname|class=node}{tr:id=name}{td}h6.textname{td}{tr}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[String]{td}{tr}{tr:idclass=prslastDetailRow}{td}*Parameters*\\{td}{tr}{tbody}{trtbody:id=ret}{td}*Returns*\\[String]{td}{trselected|class=node}{tr:id=seename}{td}*Also see*\\{div:class=sIndent}{div}{h6.selected{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=samret}{td}*SampleReturns*\\{div:class=sIndent}{div}{ [Boolean]{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{tabletbody:id=functiontext|class=servoy sDetailnode}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=doClick|class=nodetr:id=name}{td}h6.text{td}{tr}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=nameret}{td}h6.doClick*Returns*\\ [String]{td}{tr}{tr:id=sigclass=lastDetailRow}{td}{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}Script the selection (emulate a mouse click) of the item.}{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=sncsig}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\void{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=seedes}{td}*Also see*\\{div:class=sIndent}{div}Script the selection (emulate a mouse click) of the item.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}void{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{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}Gets the specified client property for the element based on a key.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\key
{td}{tr}{tr:id=ret}{td}*Returns*\\[Object] element based on a key.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{key
{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div} [Object]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{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=sncdes}{td}*Since*\\ Replace with version infoSets the value for the specified element client property key.{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}{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}Set the accelerator key of the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\key
{td}{tr}{tr:id=ret}{td}*Returns*\\[MenuItem]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}*\\ [MenuItem]{td}{tr}{tr:id=sam}{td}*Sample*\\{div: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 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=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}Set the background color of the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\backgroundColor
: bold;}setBackgroundColor{span}{span:id=iets|style=float: left;}\(backgroundColor){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\voidSet the background color of the item.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{backgroundColor
{td}{tr}{tr:id=linkret}{td}*External links*\\{div:class=sIndent}{div}}*Returns*\\void{td}{tr}{tr:id=sam}{td}*Sample*\\{div: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 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=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
weight: bold;}setForegroundColor{span}{span:id=iets|style=float: left;}\(foregroundColor){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\voidSet the foreground color of the item.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{foregroundColor
{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}=ret}{td}*Returns*\\void{td}{tr}{tr:id=sam}{td}*Sample*\\{div: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 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=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}Set the icon of the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\icon
: bold;}setIcon{span}{span:id=iets|style=float: left;}\(icon){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\[MenuItem]Set the icon of the item.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{icon
{td}{tr}{tr:id=linkret}{td}*External links*\\{div:class=sIndent}{div}}*Returns*\\ [MenuItem]{td}{tr}{tr:id=sam}{td}*Sample*\\{div: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 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=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}Set the method for the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\method
: bold;}setMethod{span}{span:id=iets|style=float: left;}\(method){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\[MenuItem]Set the method for the item.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{method
{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndentret}{div}td}*Returns*\\ [MenuItem]{td}{tr}{tr:id=sam}{td}*Sample*\\{div: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 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=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}Set the mnemonic key of the item.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\key
: left;}\(key){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\[MenuItem]Set the mnemonic key of the item.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}key
{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [MenuItem]{td}{tr}{tr:id=sam}{td}*Sample*\\{div: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 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=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}Set the item visible.{span}{td}{tr}{tr:id=sncdes}{td}*Since*\\ Replace with version infoSet the item visible.{td}{tr}{tr:id=prs}{td}*Parameters*\\visible
{td}{tr}{tr:id=ret}{td}*Returns*\\ [MenuItem]{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 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}{table}