OnExit Event

Applies to TestComplete 15.64, last modified on May 16, 2024

Occurs when a component loses the input focus.


OnExit(Sender) Parameters
Sender [in] Required Variant

Applies To

The property applies to the following components:

TcxButton, TcxButtonEdit, TcxCalcEdit, TcxCheckBox, TcxComboBox, TcxCurrencyEdit, TcxDateEdit, TcxGroupBox, TcxLabel, TcxListBox, TcxMemo, TcxMRUEdit, TcxProgressBar, TcxRadioGroup, TcxSpinEdit, TcxTextEdit, TcxTimeEdit, TPanel


The OnExit event occurs when a component loses the input focus. When the child component loses focus, the OnExit event is first generated for the child component and then its parent component. The OnExit event does not occur when switching between a form and another window.

You can create an event handler for the OnExit event to perform specific actions when a component becomes inactive.


The event has the following parameter:


Contains a reference to the user form component that has raised the event. That is, the component that has lost focus.


When the component loses focus, events occur in the following order:

See Also

Handling Events in User Forms
OnEnter Event

Highlight search results