Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : DEFAULT-BUTTON attribute
 

DEFAULT-BUTTON attribute

Indicates whether a button is a default button for the frame or dialog box.
Data type: HANDLE
Access: Readable/Writeable
Applies to: DIALOG-BOX widget, FRAME widget
To make the specified button the default button for the frame or dialog box, you must also set the button's DEFAULT attribute to TRUE.
The DEFAULT-BUTTON attribute for frames is not supported in character mode.
The default button cannot display an image.
A default button is one that handles all RETURN events when no other RETURN-enabling widget in the frame or dialog box has focus. RETURN-enabling widgets include any field-level widget for which a RETURN trigger is defined, or any button, whether or not it has a trigger defined. Thus, if a button has focus, that button handles the next RETURN event. If any other field-level widget without a RETURN trigger has focus, the default button handles the next RETURN event.
Note: When the frame receives a default RETURN event, it actually sends a CHOOSE event to the default button. If the user presses the RETURN key while in a frame that has no default button, and the frame is part of a frame family, the AVM applies the CHOOSE event to the first default button it can find within the frame family in random order.