Specifies whether the specified control is the default button in a picture.
Syntax
object.Default [= Boolean]
Properties
The Default property syntax has this part:
Part |
Description |
object |
An object expression that evaluates to an object in the Applies To list. |
Settings
The settings for Boolean are:
Value |
Description |
True |
The control is the Default button of the picture in the Run-time environment. |
False |
The control is not the Default button of the picture. (Default) |
Remarks
Only one control in a picture can be the default button. When Default is set to True for one control, it is automatically set to False for all other controls in the picture. When the control's Default property setting is True and its parent picture is active, the user can choose the command button (invoking its Click event) by pressing ENTER. Any other control with the focus doesn't receive a keyboard event (KeyDown, KeyPress, or KeyUp) for the ENTER key unless the user has moved the focus to another button in the same picture. In this case, pressing ENTER chooses the button that has the focus instead of the default button.
The Default property of a control can be set to True only if the control is a pushbutton control or any control that behaves like a button i.e., marked with OLEMISC_ACTSLIKEBUTTON flag.