DEFAULT Property (MENUITEM)
The DEFAULT property marks a MENUITEM as the default command item within a MENU, SUBMENU, or FLOATMENU object. The property uses the following format:
DEFAULT[={value}]
Note the following:
The DEFAULT property may be used in the SETPROP or GETPROP statements for a MENUITEM object.
If the DEFAULT property is specified without an assigned {value}, the action is the same as if DEFAULT=1 were specified.
{value} is a decimal number, a Numeric Variable, an Expression, or a keyword as defined in PLBEQU.INC. The supported values and keywords are:
|
Value |
Keyword |
Enter key trapping is ... |
|
0 |
$OFF |
disabled. (default) |
|
1 |
$ON |
enabled. |
When a DEFAULT key action generates the click event for a BUTTON object, the 'eventMod' value of 0x100 indicates that a DEFAULT key action generated the click event.
When the DEFAULT property is used for a MENUITEM in a popup FLOATMENU object, no automatic selection or automatic event generation occurs for the default command item when the popup menu is displayed.
For an active MENU or FLOATMENU popup, the current selection may be changed by either the mouse pointer or the keyboard arrow keys. The Enter key acts on the currently highlighted item, not merely on the MENUITEM marked with the DEFAULT property.
See Also: Object Properties, Object IO Instructions, Object Definitions
![]() |