This component is used as the dropdown menus in MenuBar. It can also be used as a stand-alone popup menu. Supports infinite cascading submenus, images, drop-shadows, checked items and radio items.
When used as a context menu, this events fires just before the menu is shown. You must return a boolean to signify whether the menu is allowed to be shown or not.
The "arg" parameter fed to this method is an inline Object. See below for accepted parameters. Any parameters not listed here that you add may also be attached to any returned Object.
Creates a cascading childmenu for a specified menuitem. This method returns a reference to this new childMenu, which can then be used to add more items to.
Available "arg" Parameters:
Parameter
Type
Required
Default
Description
parent
variant
Y
Menuitem to add the child to. Can be either a reference or an index.
The "arg" parameter fed to this method is an inline Object. See below for accepted parameters. Any parameters not listed here that you add may also be attached to any returned Object.
Adds a brand new item to the menu. text if the text that will be displayed and onclick is some optional Javascript to perform should the user select the item.
Returns a reference to the new item.
Path of the image to be used. This can be an Imagelist, with enabled and disabled images.
name
String
miCamelCased name
When menuitems are named, you can then refer to them directly through the Popupmenu using dot notation. Defaults to a camel-case version of the text property.
visible
boolean
true
enabled
boolean
true
imgW
integer
16
imgH
integer
16
checked
boolean
false
Determines whether a checkbox appears next to the menuitem. Cannot be used with images.
autoCheck
boolean
false
Allows an item to be toggled on and off by the user. Use the checked property to control the initial state.
radioGroup
integer
null
If numerous items are given the same radioGroup number, they function as a set of radiobuttons. You can pass checked to one of them to set the intial state. Cannot be used with images.