Mark up Text

How to mark Text in a TEdit ?
My program fills in some Edits automatically with POSSIBLE Text-Data. So how to automatically mark up/highlight this Text, that the User may delete it easily if it does not match ?
LVL 2
omsecAsked:
Who is Participating?
 
BoRiSConnect With a Mentor Commented:
omsec

procedure TForm1.FormCreate(Sender: TObject);
begin
 Edit1.SelectAll;
end;

this will select all the text in the edit1 on the form create..

Later
BoRiS
0
 
erajojCommented:
Hi,
Also check the documentation on the AutoSelect property.

/// John
0
 
viktornetCommented:
you could also use SelStart and SelLength

I think you cannot select all edit controls if you don't have th focus on it.....
//vik
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.