Enter key automation settings.

Usage

Set_Property(OLECtrlEntID, "OLE.EnterBehavior", OptionValue)

Values

OptionValue can be set to one of the following valid options:

ValueAbbr.Description
NoneNPressing the Enter key fires no events
SingleSPressing the Enter key fires the OnClick event
DoubleDPressing the Enter key fires the OnDblClick event

Default: Double

Remarks

The EnterBehavior property establishes how the control treats the Enter key. By default, pressing the Enter key fires the OnDblClick event. However, you can choose to have the Enter key fire the OnClick event or to prevent the Enter key from firing any events at all. Simply set this property to "Single" or "None" to achieve the respective results, or leave it set to "Double" to receive the OnDblClick message.

If you set this property to "None", then pressing the Enter key will move focus to the next control on the form or click the form's default push button. In other words, the Enter keystroke is passed to the parent form for processing.

Example

// Turn off Enter key automation 
Set_Property(@Window:".OLE_TREE", "OLE.EnterBehavior", "None")

See Also

CheckBehaviorDropBehaviorExpandBehaviorSelectBehaviorOnClickOnDblClick

  • No labels