1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| unit PngPage;
interface
uses
Windows, System.SysUtils, System.Classes, Winapi.UxTheme, StdCtrls,ImgList, Vcl.Controls,Vcl.Forms, Vcl.ExtCtrls, Types, messages, Graphics, Math;
type
TPngBouton = class(TShape)
private
{ Déclarations privées }
protected
{ Déclarations protégées }
public
{ Déclarations publiques }
Constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
{ Déclarations publiées }
end;
type
TPngPage = class(TPanel)
private
{ Déclarations privées }
FShape:TPngBouton;
protected
{ Déclarations protégées }
public
{ Déclarations publiques }
Constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
{ Déclarations publiées }
end;
procedure Register;
implementation
begin
RegisterComponents('Mes composants', [TPngPage, TPngBouton]);
end;
Constructor TPngPage.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FShape:= TPngBouton.Create(Self);
FShape.Parent:=Self;
FShape.Width:=96;
FShape.Height:=96;
end;
Destructor TPngPage.Destroy;
begin
FShape.Free;
inherited Destroy;
end;
end. |
Partager