Delphi FMX . Setfocus

Asked

Viewed 34 times

0

In a field validation (Tedit) at Delphi Firemonkey, how do I make the component (Tedit) not lose focus?

procedure TFrmPes1101C.EditTabDataNascimentoExit(Sender: TObject);
begin
  inherited;
  if DataInvalida(EditTabDataNascimento.Text) then
  begin
    ShowMessage('Data inválida.');
    EditTabDataNascimento.SetFocus;
  end;
end;

*Even with the date invalid, the cursor moves to the next field.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.