Autor Beitrag
Thorus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

WinXP
Delphi 5
BeitragVerfasst: Mi 09.04.08 19:36 
Hallo Leute,

ich würde gerne wissen, wie ich bei einem während der Laufzeit erzeugten Objekt die Ereignisse abfange, also OnMouseMove, OnClick, usw.

_________________
MfG Thorus
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 09.04.08 19:49 
Einfach den entsprechenden Events eine passende Methode zuweisen, in etwa so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Procedure TForm1.SomeButtonOnClick(Sender: TObject);
begin
  doSomething;
end;

//...

MyButton := TButton.Create(self);
//.. Parent setzen, etc.
MyButton.OnClick := SomeButtonOnClick;

_________________
We are, we were and will not be.
Thorus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

WinXP
Delphi 5
BeitragVerfasst: Mi 09.04.08 21:10 
Vielen Dank, habe es hinbekommen.

_________________
MfG Thorus