I have a very basic problem and I do not discover the cause ... I need the text from within a TEdit to be selected integer when the field receives focus. At the time of Delphi 7 with VCL I only made TEdit(Sender).SelLength := Length(TEdit(Sender).Text)
in the OnEnter
event. Now with Delphi 10.2 and FireMonkey I've tried it in several different ways, but it does not work.
Example:
procedure TfPrincipal.Edit1Enter(Sender: TObject);
begin
TEdit(Sender).SetFocus;
TEdit(Sender).SelStart := 0; // Ja tentei mudar este valor
TEdit(Sender).SelLength := Length(TEdit(Sender).Text); // Ja tentei mudar este valor também
end;
Does not Firemonkey work differently?