Child pages
  • MenuItem

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
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


HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#ALIGN_CENTER
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#ALIGN_LEFT
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#ALIGN_RIGHT

HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#enabled
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Object[]
Table Cell (td)
#methodArguments
Set the arguments that can be read by the defined method.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#name
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#selected
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#text

HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#doClick()
Script the selection (emulate a mouse click) of the item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
#getClientProperty(key)
Gets the specified client property for the element based on a key.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#putClientProperty(key, value)
Sets the value for the specified element client property key.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
MenuItem
Table Cell (td)
#setAccelerator(key)
Set the accelerator key of the item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#setBackgroundColor(backgroundColor)
Set the background color of the item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#setForegroundColor(foregroundColor)
Set the foreground color of the item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
MenuItem
Table Cell (td)
#setIcon(icon)
Set the icon of the item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
MenuItem
Table Cell (td)
#setMethod(method)
Set the method for the item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
MenuItem
Table Cell (td)
#setMnemonic(key)
Set the mnemonic key of the item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
MenuItem
Table Cell (td)
#setVisible(visible)
Set the item visible.

HTML Table
idconstant
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Constants Details
Table Body (tbody)
idALIGN_CENTER
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idALIGN_LEFT
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idALIGN_RIGHT
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
classlastDetailRow
Table Cell (td)


HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Property Details
Table Body (tbody)
idenabled
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idmethodArguments
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Set the arguments that can be read by the defined method.
Table Row (tr)
idret
Table Cell (td)
Returns
Object[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idname
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idselected
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idtext
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
classlastDetailRow
Table Cell (td)


HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
iddoClick
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
doClick
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Script the selection (emulate a mouse click) of the item.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Script the selection (emulate a mouse click) of the item.
// Clicking a separator will throw an error!
plugins.window.getMenu(2).getItem(0).doClick();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetClientProperty
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Object
Span
stylefloat: left; font-weight: bold;
idiets
getClientProperty
Span
stylefloat: left;
idiets
(key)
Table Row (tr)
iddes
Table Cell (td)
Gets the specified client property for the element based on a key.
Table Row (tr)
idprs
Table Cell (td)
Parameters
key
Table Row (tr)
idret
Table Cell (td)
Returns
Object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// 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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idputClientProperty
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
putClientProperty
Span
stylefloat: left;
idiets
(key, value)
Table Row (tr)
iddes
Table Cell (td)
Sets the value for the specified element client property key.
Table Row (tr)
idprs
Table Cell (td)
Parameters
key
value
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// 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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetAccelerator
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
MenuItem
Span
stylefloat: left; font-weight: bold;
idiets
setAccelerator
Span
stylefloat: left;
idiets
(key)
Table Row (tr)
iddes
Table Cell (td)
Set the accelerator key of the item.
Table Row (tr)
idprs
Table Cell (td)
Parameters
key
Table Row (tr)
idret
Table Cell (td)
Returns
MenuItem
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetBackgroundColor
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
setBackgroundColor
Span
stylefloat: left;
idiets
(backgroundColor)
Table Row (tr)
iddes
Table Cell (td)
Set the background color of the item.
Table Row (tr)
idprs
Table Cell (td)
Parameters
backgroundColor
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetForegroundColor
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
setForegroundColor
Span
stylefloat: left;
idiets
(foregroundColor)
Table Row (tr)
iddes
Table Cell (td)
Set the foreground color of the item.
Table Row (tr)
idprs
Table Cell (td)
Parameters
foregroundColor
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetIcon
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
MenuItem
Span
stylefloat: left; font-weight: bold;
idiets
setIcon
Span
stylefloat: left;
idiets
(icon)
Table Row (tr)
iddes
Table Cell (td)
Set the icon of the item.
Table Row (tr)
idprs
Table Cell (td)
Parameters
icon
Table Row (tr)
idret
Table Cell (td)
Returns
MenuItem
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetMethod
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
MenuItem
Span
stylefloat: left; font-weight: bold;
idiets
setMethod
Span
stylefloat: left;
idiets
(method)
Table Row (tr)
iddes
Table Cell (td)
Set the method for the item.
Table Row (tr)
idprs
Table Cell (td)
Parameters
method
Table Row (tr)
idret
Table Cell (td)
Returns
MenuItem
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetMnemonic
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
MenuItem
Span
stylefloat: left; font-weight: bold;
idiets
setMnemonic
Span
stylefloat: left;
idiets
(key)
Table Row (tr)
iddes
Table Cell (td)
Set the mnemonic key of the item.
Table Row (tr)
idprs
Table Cell (td)
Parameters
key
Table Row (tr)
idret
Table Cell (td)
Returns
MenuItem
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetVisible
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
MenuItem
Span
stylefloat: left; font-weight: bold;
idiets
setVisible
Span
stylefloat: left;
idiets
(visible)
Table Row (tr)
iddes
Table Cell (td)
Set the item visible.
Table Row (tr)
idprs
Table Cell (td)
Parameters
visible
Table Row (tr)
idret
Table Cell (td)
Returns
MenuItem
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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');
Table Row (tr)
classlastDetailRow
Table Cell (td)