FMX.StdCtrls.TImageControl.OnExit

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnExit: TNotifyEvent read FOnExit write FOnExit;

C++

__property OnExit;

Properties

Type Visibility Source Unit Parent
event published
FMX.StdCtrls.pas
FMX.StdCtrls.hpp
FMX.StdCtrls TImageControl

Description

Occurs when the input focus is taken from the control.

FMX.StdCtrls.TImageControl.OnExit inherits from FMX.Controls.TControl.OnExit. All content below this line refers to FMX.Controls.TControl.OnExit.

Occurs when the input focus is taken from the control.

OnExit also occurs when DoExit is called.

Write an event handler for OnExit to specify what happens when the input focus is taken from the control.

Note: For example in TEdit control, you may want to prevent the user from leaving the control until a certain value has been entered into it. This can be done with the code like this:
procedure TForm1.Edit1Exit(Sender: TObject);
begin
  if Edit1.Text <> 'Hello' then
   Edit1.Abort;
end;
Notice that the code like Edit1.SetFocus; does not have the expected effect.

See Also