RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomForm.DefocusControl Method

Removes focus from a control on the form.

Pascal
procedure DefocusControl(Control: TWinControl; Removing: Boolean);
C++
__fastcall DefocusControl(TWinControl * Control, Boolean Removing);

Use DefocusControl to remove focus from a control on the form. This method is used internally by the VCL. 

Control is the control from which to remove focus. If Control is the form's active control, DefocusControl sets the form's ActiveControl property to nil (Delphi) or NULL (C++). 

Removing specifies whether to set focus to the control's parent. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!