Autor Beitrag
toxicmaster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mi 30.03.05 07:28 
hi,
wie kann ich es hinbekommen, dass ein button bei dem drücken von enter betätigt wird?
habe etwas probiert, nämlich:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.btratenClick(Sender: TObject);
begin
{hier steht sonst was drin ist hier aber unwichtig}
end;

procedure TForm1.btratenEnter(Sender: TObject);
begin
BtratenClick(Btraten);
end;
TheHolyMan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mi 30.03.05 07:38 
beim button die eigenschaft default auf true setzen

dann wird onClickereignis bei einem enter ausgelößt
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: Mi 30.03.05 07:39 
Setze einfach in die Eigenschaft "Default" des Buttons auf True.

EDIT: Der (Schein)-Heilige war schneller :wink:


Zuletzt bearbeitet von jasocul am Mi 30.03.05 07:40, insgesamt 1-mal bearbeitet
MisterBum83
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 245
Erhaltene Danke: 2

WIN XP
Delphi 6
BeitragVerfasst: Mi 30.03.05 07:39 
Das OnKeyPress-Ereignis hilft dir hier weiter. Darin kannst du dann Enter (chr(13)) abfragen!
toxicmaster Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mi 30.03.05 07:54 
danke hat mit dem default funktioniert.
muss ich bei dem onkeypress nen key nennen oder wie geht das?
weil es soll ja nur bei enter geklcikt werden!

EDIT: oh bemerke gerade, dass ich was überlesen habe :D
wie soll ich das abfragen?