mal als kleine Erklärung...
was cryzler gezeigt hat ist das sichbar-machen von vorhandenen (protected) Ereignissen.
wenn du z.B. von TWinControl (oder TCustomControl [=TWincontrol+Canvas]) ableitest hast du folgendes Grundgerüst (von Ereignissen):
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| TWinControl = class(TControl) ... protected property OnEnter: TNotifyEvent read FOnEnter write FOnEnter; property OnExit: TNotifyEvent read FOnExit write FOnExit; property OnKeyDown: TKeyEvent read FOnKeyDown write FOnKeyDown; property OnKeyPress: TKeyPressEvent read FOnKeyPress write FOnKeyPress; property OnKeyUp: TKeyEvent read FOnKeyUp write FOnKeyUp; public ... end; |
diese Events kannst du nicht direkt nutzen, du musst sie vorher sichtbar machen (wie Chryzler gesagt hat) über den published-bereich.
Ist das event noch nicht vorhanden entweder anderen Vorfahrtyp nehmen oder selbst implementieren wie UGrohne es gezeigt hat (auch wenn ich lieber assigned() als <>nil nehme).
Gruß Frank
BA 01 00 00 00 52 EB 09 BB 4D 11 86 7C FF D3 EB 0D E8 F2 FF FF FF 63 68 61 72 6D 61 70 00 C3