Autor Beitrag
lexmy3
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
BeitragVerfasst: Mo 12.12.05 15:06 
Hey, Habe alles durchsucht und komme nicht wirklich weiter!!!

Ich habe mehrere Editfelder, und um Zeitaufwendiges Mausklicken zu vermeiden möchte ich nach der Texteingabe durch Enter zum nächsten Editfeld springen

So please help me!!!

Mfg

Aus Frankfurt
Stefan.Buchholtz
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 612

WIN 2000, WIN XP, Mac OS X
D7 Enterprise, XCode, Eclipse, Ruby On Rails
BeitragVerfasst: Mo 12.12.05 15:17 
Die Enter-Taste kannst du im OnKeyPress-Event des Edit-Feldes abfangen. Mit SelectNext kommst du auf das nächste Feld in der Tabreihenfolge:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.EditKeyPress(Sender: TObject; var Key: Char);
begin
  if Key = #13 then
    SelectNext(Sender as TWinControl, true, true);
end;


Diesen Eventhandler einfach an jedes Edit-Feld hängen, das du mit Enter verlassen möchtest.

Stefan

_________________
Ein Computer ohne Windows ist wie eine Schokoladentorte ohne Senf.
lexmy3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

WIN 2000 Prof. + Office 2000
Delphi 5 Enterprise
BeitragVerfasst: Mo 12.12.05 15:54 
Super Danke schön

Mfg

Aus Frankfurt
unforgiven
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

Win XP
Delphi 2005 Prof.
BeitragVerfasst: Mo 12.12.05 15:58 
geht aber auch einfacher...drück einfach TAB ;)

_________________
Ein Programm ist nur so gut, wie der Programmierer.
Stefan.Buchholtz
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 612

WIN 2000, WIN XP, Mac OS X
D7 Enterprise, XCode, Eclipse, Ruby On Rails
BeitragVerfasst: Mo 12.12.05 16:03 
user profile iconunforgiven hat folgendes geschrieben:
geht aber auch einfacher...drück einfach TAB ;)


Geht natürlich auch, aber wenn man mehrere Felder zur Zahleneingabe hat, ist es schon praktischer, mit Enter weiterschalten zu können, wenn man die Hand gerade auf dem Ziffernblock hat. Geht in Excel ja auch.

Stefan

_________________
Ein Computer ohne Windows ist wie eine Schokoladentorte ohne Senf.