Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Edit-Feld (https://www.delphipraxis.net/53793-edit-feld.html)

Markey 22. Sep 2005 14:27


Edit-Feld
 
Ich hätte da mal eine Frage...

Wenn in einem Edit-Feld z.B. mehrer Zahlen stehen,

wie kann ich dann die letzte Zahl durch einen Buttonclick löschen??

Danke schon mal

Matze 22. Sep 2005 14:29

Re: Edit-Feld
 
Delphi-Quellcode:
Edit1.Text := Copy(Edit1.Text, 1, Length(Edit1.Text) - 1);
Nachtrag: Herzlich willkommen! :)

Markey 22. Sep 2005 14:31

Re: Edit-Feld
 
Danke das wird mir sehr weiterhelfen :-D

Ultimator 22. Sep 2005 14:31

Re: Edit-Feld
 
Delphi-Quellcode:
Edit1.Text := copy(Edit1.Text, 0, length(Edit1.Text) -1);
;)

//edit: Nee, oder? Dummer toter Kasten -.- *g*

Matze 22. Sep 2005 14:32

Re: Edit-Feld
 
Zitat:

Zitat von Ultimator
Delphi-Quellcode:
Edit1.Text := copy(Edit1.Text, 0, length(Edit1.Text) -1);

Ich würde mit Index 1 anfangen (s.o.) ;)

Ultimator 22. Sep 2005 14:34

Re: Edit-Feld
 
Zitat:

Zitat von Matze
Zitat:

Zitat von Ultimator
Delphi-Quellcode:
Edit1.Text := copy(Edit1.Text, 0, length(Edit1.Text) -1);

Ich würde mit Index 1 anfangen (s.o.) ;)

Klappt mit 0 genauso :mrgreen:

Aber hast Recht, Strings fangen ja praktisch mit 1 an^^


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:53 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz