Specifies the selection behavior when entering a TextBox or ComboBox.
Syntax
object.EnterFieldBehavior [= fmEnterFieldBehavior]
The EnterFieldBehavior property syntax has these parts:
Part | Description |
---|---|
object | Required. A valid object. |
fmEnterFieldBehavior | Optional. The desired selection behavior. |
Settings
The settings for fmEnterFieldBehavior are:
Constant | Value | Description |
---|---|---|
fmEnterFieldBehaviorSelectAll | 0 | Selects the entire contents of the edit region when entering the control (default). |
fmEnterFieldBehaviorRecallSelection | 1 | Leaves the selection unchanged. Visually, this uses the selection that was in effect the last time the control was active. |
Remarks
The EnterFieldBehavior property controls the way text is selected when the user tabs to the control, not when the control receives focus as a result of the SetFocus method. Following SetFocus, the contents of the control are not selected and the insertion point appears after the last character in the control's edit region.