Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > FocusManager class > FocusManager.defaultPushButton | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004 and Flash MX Professional 2004.
focusManager.defaultPushButton
Property; specifies the default push button for an application. When the user presses Enter (Windows) or Return (Macintosh), the listeners of the default push button receive a click event. The default value is undefined and the data type of this property is object.
The Focus Manager uses the emphasized style declaration of the SimpleButton class to visually indicate the current default push button.
The value of the defaultPushButton property is always the button that has focus. Setting the defaultPushButton property does not give initial focus to the default push button. If there are several buttons in an application, the button that currently has focus receives the click event when Enter or Return is pressed. If some other component has focus when Enter or Return is pressed, the defaultPushButton property is reset to its original value.
The following code sets the default push button to the OKButton instance:
focusManager.defaultPushButton = OKButton;
FocusManager.defaultPushButtonEnabled, FocusManager.sendDefaultPushButtonEvent()
Flash CS3