Autor Beitrag
SweeT_C
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Mi 28.03.07 19:05 
Hoi!

Ich klick auf ein edit-feld und habe den Courser nun an der Position. Wie kann ich es machen, dass das gesamte Texte markiert wird ?

MfG 'n' Thx
SweeT_C
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 28.03.07 19:06 
Hallo!

Das kannst Du machen, indem Du die Eigenschaften SelStart und SelLength des TEdit entsprechend setzt.

Grüße
Christian

//edit: Ich sehe gerade, dass TEdit einen SelectAll-Methode kennt

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Mi 28.03.07 19:08 
oder so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Edit1Click(Sender: TObject);
begin
 Edit1.SelectAll;
end;


Gruß
SweeT_C Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Mi 28.03.07 20:01 
DAnke!
.selectall funktioniert einwandfrei!