BiMenuButton
This class is used for displaying the buttons of a menu bar.
This class extends BiLabel and therefore all methods and fields available for BiLabel are also available for BiMenuButton .
Constructor
new BiMenuButton ( [ sText [ ,oMenu ] ] )
Parameters
| Name | Type | Optional | Default | Descripton |
sText | String | ![]() | The text to display on the menu button. | |
oMenu | | ![]() | The menu that should be opened when the button is clicked. If left out make sure that the menu property is set before adding to a menu bar. |
Properties
| Name | Type | get | set | Descripton |
menu | | ![]() | ![]() | The menu that will be displayed when the button is clicked. |
Methods
| Name | Description |
popupMenu | Displays the menu for this button. |
Events
None.
Static Methods
None.
Static Fields
None.
Remarks
Although BiMenuButton extends BiComponent (and BiLabel) it is not recommended to use the inherited properties, or to add a BiMenuButton to any component that is not a BiMenuBar. Use only properties inherited from BiEventTarget. This inheritance was chosen in order to quickly create a new unified menu implementation. In the future the inheritance may change, but BiEventTarget will remain a superclass.
Method Details
popupMenu
Displays the menu for this button.
Syntax
object.popupMenu ( bSelectFirst ) Parameters
| Name | Type | Optional | Default | Descripton |
bSelectFirst | Boolean | Whether to make the first (top) available item selected (and focused). Setting this parameter to false (or skipping it) instead focuses the menu itself and the user may select the first available item by pressing the down arrow. |
Return Type
void
