Vcl.Forms.TCustomForm.ActiveControl

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ActiveControl: TWinControl read FActiveControl write SetActiveControl  stored IsForm;

C++

__property Vcl::Controls::TWinControl* ActiveControl = {read=FActiveControl, write=SetActiveControl, stored=IsForm};

Properties

Type Visibility Source Unit Parent
property public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TCustomForm

Description

Specifies the control that has focus on the form.

Use ActiveControl to get or set the control that has focus on the form. Only one control can have focus at a given time in an application.

If the form does not have focus, ActiveControl is the control on the form that will receive focus when the form receives focus.

Note: When focus shifts to another control, ActiveControl is updated before the OnExit event occurs.

See Also

Code Examples