Registriert seit: 7. Jan 2003
Ort: Menden
192 Beiträge
Delphi 7 Enterprise
|
Re: OnMouseDown Ereignis bei EigButton (abgeleitet von TPane
26. Sep 2004, 20:13
Delphi-Quellcode:
unit AButton;
interface
uses
Classes, Controls, ExtCtrls, Windows;
type
TAButton = class(TPanel)
private
{ Private-Deklarationen }
protected
{ Protected-Deklarationen }
public
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
{ Public-Deklarationen }
published
{ Published-Deklarationen }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents(' Beispiele', [TAButton]);
end;
{ TAButton }
{ TAButton }
procedure TAButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
Y: Integer);
begin
inherited;
Caption := ' Down';
end;
procedure TAButton.MouseUp(Button: TMouseButton; Shift: TShiftState; X,
Y: Integer);
begin
inherited;
Caption := ' Up';
end;
end.
Christian Killing for peace is like fucking for virginity
Nightshade
|
|
Zitat
|