Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 10.06.05 12:26 
Ich benütze ein TEdit um eine Eingabe zu machen, welche mit der Return-Taste abgeschlossen wird.
Das heisst im OnKeyUp steht:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  if key = 13 then
       begin
          key:= VK_CANCEL;
          prc_NLSuche;
          edtNLSuche.Text:='';
       end;


Dann geht ein witeres Fenster auf usw. Das weitere Fenster das aufgeht muss mit Klick
auf OK bestätigt werden. Der OK Button ist per Default markiert, was auch richtig ist.
Drücke ich jetzt allerdings die Return Taste, so wird der OK Button Virtuell gedrückt,
dabei allerdings auch gleich wieder das obere Script angesprochen und die prc_NLSuche gestartet. Wie kann dich das Trennen??
Muss ich den Tastatur Puffer leeren?? Wenn ja wie geht das???
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 10.06.05 12:28 
iirc:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  if key = 13 then
       begin
          key:= 0; // Hier ändern
          prc_NLSuche;
          edtNLSuche.Text:='';
       end;
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 10.06.05 12:30 
Aber wenn ich ein ShowMessage() mit Enter schließe, dann müsste ich das doch auch machen, oder?? Ich hab aber keine Key Variable dann.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 10.06.05 12:34 
Ein Objekt, dass eine Ereignis annimmt, muss das Ereignis als abgearbeit melden. Das ShowMessage kümmert sich selbst darum.
Oder habe ich jetzt die Frage falsch verstanden?