Seryth
Seryth

Reputation: 143

Moving the position cursor to the end of string in edit box

After reassigning a string to an edit box, the position cursor is moved to the before the first character in the string. How do I set the position cursor to the end of the string? This is my current code:

begin
  pin:=ledtAdminPin.Text;
  SetLength(pin, 4);
  ledtAdminPin.Text:=pin;
end;

Upvotes: 0

Views: 4466

Answers (1)

David Heffernan
David Heffernan

Reputation: 612944

Use the SelStart property:

ledtAdminPin.SelStart := high(Integer);

Upvotes: 4

Related Questions