Sets or gets the name of the macro or script to be run when the GotFocus event occurs.
object.OnGotFocus = [string]
Where object is an object expression that evaluates to one of the controls in the Applies To list, and string is a string expression specifying the script or macro to run when the event is triggered.
Newlook Smartclient only.
The GotFocus event occurs when an object receives the focus. A form receives the focus only when all visible controls are disabled or the host screen is received with the focus on a disabled or hidden control.
Typically, you use an OnGotFocus macro or script to specify the actions that occur when a control or form first receives the focus. For example, by attaching an OnGotFocus macro to each control on a form, you can guide the user by displaying brief instructions or status bar messages. You can also provide visual cues by enabling, disabling, or showing other controls that depend on the control that has the focus.
An object can receive the focus only if its Enabled and Visible properties are set to True.
To customize the keyboard interface for changing the focus, set the tab order or specify access keys for controls on a form.
In relation to the DataGrid control, the GotFocus event is triggered once when the DataGrid object first receives the focus. Use the BeginEdit event to specify actions to run when individual cells receive the focus.
A form receives the focus only when all visible controls are disabled or the host screen is received with the focus on a disabled or hidden control.
OnLostFocus property | ActiveControl property | Enabled property | Visible property
ScrollBar control (control deprecated in version 10.5)
© 2004-2021 looksoftware. All rights reserved.