CanGetFocus Property

       

Returns or sets a value determining if a control can receive focus. The CanGetFocus property is read/write at the control’s authoring time, and not available at the control’s run time.

Settings

The settings for CanGetFocus are:

Setting Description
True (Default) The control can receive focus. If the control contains constituent controls, the control itself will be unable to receive the focus unless none of its constituent controls can receive the focus. It is up to the author of the control to write the code that draws a focus rectangle on the control when it does receive focus.
False The control cannot receive focus.

Remarks

As long as the control contains at least one constituent control that has been set to receive the focus, CanGetFocus cannot be set to False. If CanGetFocus is False, then no constituent control can be set to receive the focus.