Allows the OLE Button to become the Default Push Button for the current form so it will automatically respond whenever the end user presses the Enter key.

Usage

Set_Property(OLECtrlEntID, "OLE.Default", Boolean)

Values

[True | False]

Default: False

Remarks

When the Enter key is pressed, an OnClick event is sent to the current SRP OLE Button control with the Default property set to 1. If a regular OpenInsight pushbutton control has the Default Push Button box checked it will be overridden by this property.

This property is only respond when a non-pushbutton (OpenInsight or SRP OLE) control has focus. Otherwise, the current pushbutton with focus will respond to the Enter key as if it was clicked on directly by the end user.

Only one SRP OLE Button should have the Default property set to 1. Having more than one Default Push Button on the same form might cause unexpected behavior.

Example

 

Equ True$ to 1 
Equ False$ to 0 

// Set the caption and accelerator for the OK button 
Set_Property(@Window:".OLE_OK_BUTTON", "OLE.Caption", "&OK") 

// Set the button as the Default Push Button 
Set_Property(@Window:".OLE_OK_BUTTON", "OLE.Default", True$)

See Also

CancelOnClick

  • No labels