Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 28.10.02 16:08 
hallo,
ich möchte nur wissen, wie folgendes geht:
der user soll in ein editfeld etwas eintragen, so, wenn im 1. editfeld eine bestimmte länge erreicht ist, dann soll ein 2 editfeld mit
edit2.SetFocus; angesprochen werden. hab schon vieles versucht, nur es hat nch nicht geklappt.
mfg hibbert
Steffer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 299



BeitragVerfasst: Mo 28.10.02 16:39 
>wenn im 1. editfeld eine bestimmte länge erreicht ist
Dazu gibt es Length()

> dann soll ein 2 editfeld mit
Das kannst du in KeyUp() ermitteln

_________________
Keine Signatur ...
GruppeCN
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 322



BeitragVerfasst: Mo 28.10.02 19:59 
Titel: Beispiel
Steffer hat schon recht, hier ist das passende Beispiel:

ausblenden Quelltext
1:
2:
3:
4:
if Length(Edit1.Text) = 10 then
begin
Edit2.SetFocus;
end;


Du kannst aber auch eine bestimmte Zeichenfolge abfragen.

ausblenden Quelltext
1:
2:
3:
4:
if Edit1.Text = 'text' then
begin
Edit2.SetFocus;
end;


Falls du weiterhin Probleme mit damit hast, schreib uns eine E-Mail. Wir schicken dir dann ein Beispiel-Programm zu.

_________________
Warum sind die Sachen, die du suchst, immer da, wo du zuletzt nachsiehst?
Weil du aufhörst zu suchen, wenn du sie gefunden hast.
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 28.10.02 20:12 
Vielen dank !!
das mit
ausblenden Quelltext
1:
2:
3:
4:
if Edit1.Text = 'text' then 
begin 
Edit2.SetFocus; 
end;

kannte ich schon aber
ausblenden Quelltext
1:
2:
3:
4:
if Length(Edit1.Text) = 10 then 
begin 
Edit2.SetFocus; 
end;

ist genau das richtige !
DANKE !!!
mfg hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
Steffer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 299



BeitragVerfasst: Mo 28.10.02 21:46 
>Steffer hat schon recht, hier ist das passende Beispiel:
Danke.
Ich antworte in diesen Fällen nicht so kurz, weil ich ein Sado bin...

..sondern weil die Leutchen sonst NIE lernen die F1 Taste und Online-Hilfe zu gebrauchen :wink:

_________________
Keine Signatur ...