Hello Guys,
i wanted to do following: When the User clicks in a certain field(TEdit), the whole text in the field should be selected.
i tried:
-> Working with SelLength and SelStart (no effect):
procedure TMyClass.TxEnter(Sender: TObject);
begin
Tx.SelStart:= 0;
Tx.SelLength:= Length(Tx.Text);
end;
-> The Porperty "Autoselect" (Standard set to True), but i had no effect on the Edit either
-> The Function SelectAll (no effect again)
procedure TMyClass.TxEnter(Sender: TObject);
begin
Tx.SelectAll;
end;
found out that the "SelectAll" Function and the "SelStart" and "SelLength" Functions only work in the OnClick event handler. But the Problem here is that i wanted to create a shared handler for this function and in some fileds i already have code in the onClick event.
So back to the AutoSelect Property. Got it checked in the Object inspector but with no effect. Could someone help me ou please ? thanks in advance !