Thema: Delphi Zwei-mal onmousedown?

Einzelnen Beitrag anzeigen

Minz

Registriert seit: 19. Dez 2002
476 Beiträge
 
#6

Re: Zwei-mal onmousedown?

  Alt 26. Jan 2004, 08:43
Hi hat Tonic schon geschrieben:

Zitat:
constructor TButtonskin.set_koordinaten;

begin

TButtonskin.Create(self);
Parent := parent;
OnMouseDown := buttonskinonmousedown;


end;
Parent und OnMouseDown müssen TButtonskin auch zugeordnet werden.

Also entweder so:
Delphi-Quellcode:
constructor TButtonskin.set_koordinaten;
begin
  with TButtonskin.Create(self) do begin
       Parent := parent;
       OnMouseDown := buttonskinonmousedown;
  end;
end;
oder so

Delphi-Quellcode:
constructor TButtonskin.set_koordinaten;
begin
  TButtonskin.Create(self);
  TButtonskin.Parent := parent;
  TButtonskin.OnMouseDown := buttonskinonmousedown;
end;
  Mit Zitat antworten Zitat