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
| unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.TMSBaseControl,
FMX.Platform, FMX.StdCtrls, System.Rtti, FMX.Layouts, FMX.Grid;
type
TmyStringGrid = class(TStringGrid)
private
FProp: boolean;
FList: TStrings;
public
constructor Create(AOwner:TComponent); override;
destructor Destroy; override;
published
property Prop: boolean read FProp write FProp;
end;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
Grid1 : TmyStringGrid;
implementation
{$R *.fmx}
constructor TmyStringGrid.Create(AOwner:TComponent);
begin
inherited Create(AOwner);
FProp := true;
FList := TStringList.Create;
end;
destructor TmyStringGrid.Destroy;
begin
Flist.Free;
inherited;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Grid1 := TmyStringGrid.Create(Self);
end; |
Partager