Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
Delphi 5 Professional
|
Re: Events von Kompo in Klasse weiterleiten
11. Sep 2005, 00:55
Delphi-Quellcode:
type
TTextBox = class(TBox)
private
TextLbl: TLabel;
procedure SetMouseDown(Value: TMouseEvent);
function GetMouseDown: TMouseEvent;
published
property OnMouseDown: TMouseEvent read GetMouseDown write SetMouseDown;
end;
Delphi-Quellcode:
function TTextBox.GetMouseDown: TMouseEvent;
begin
Result := TextLbl.OnMouseDown;
end;
procedure TTextBox.SetMouseDown(Value: TMouseEvent);
begin
TextLbl.OnMouseDown := Value;
end;
Achtung: Nicht getestet!
Ciao, Sprint.
"I don't know what I am doing, but I am sure I am having fun!"
|