Gets or sets whether the control will recieve focus when the user clicks on it.
object.TakeFocusOnClick = [boolean]
Where object is an object expression that evaluates to one of the controls in the Applies To list, and boolean is a boolean expression that evaluates to either True or False, as described in Settings.
Newlook Smartclient only.
from version 11.0 for the Data and Tab objects. Refer to Deprecated and Obsolete items for additional information.
This property is used to prevent a control from having the focus once clicked, or alternatively, give a control focus if typically it does not receive it when clicked.
The TakeFocusOnClick property defaults to True for the following controls:
The TakeFocusOnClick property defaults to False for the following controls:
This property can be very useful if you need to dynamically return a property of a clicked object that would not normally receive focus. Turning this property on, allows the clicked control to become the form's ActiveControl.
The TakeFocusOnClick settings for the check box, command button, label, menu button, option button and picture box controls are :
Setting |
Description |
True |
(Default for check box and option button controls) Allow the control to receive focus when clicked. |
False |
(Default for command button, label, menu button and picture box controls) Prevent the control from receiving focus when clicked. |
OnClick property | OnGotFocus property | OnLostFocus property
Data control
Tab control
© 2004-2021 looksoftware. All rights reserved.