Autor Beitrag
Andreas_Sans
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Di 27.05.03 15:38 
Es gibt ja bei den Ereignissen der Buttons OnClick. Gibt es auch ein Ereignis RightClick, also, dass ich mit der rechten Maustaste ein Ereignis auslöse ?
ErnestoChe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 528

Win 2000 pro, CRUX 2.0
Delphi 6 Pers, Open K3
BeitragVerfasst: Di 27.05.03 15:58 
Hi,

gehe in im Objektinspektor auf das OnMouseDown-Ereignis der Komponente und schreib folgenden code:


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if Button = mbRight then
    caption := 'hallo';
end;


MFG

- Ernesto -
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 27.05.03 15:58 
nein, aber es gibt das ereignis OnMouseDown und das gibt dir zurück, welche Maustaste geklickt wurde.

_________________
In the beginning was the word.
And the word was content-type: text/plain.