RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWinControl.CanFocus Method

Indicates whether a control can receive focus.

Pascal
function CanFocus: Boolean; dynamic;
C++
__fastcall Boolean CanFocus();

Call CanFocus to find out if the control can receive input from the user. 

CanFocus returns true if both the control and its parent(s) have their Visible and Enabled properties set to true. If any of the Visible and Enabled properties of the control or the controls in which it is contained are not true, then CanFocus returns false. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!