Skip to content

Commit 200ed63

Browse files
committed
Adding TGrid wrapper
1 parent 65ff572 commit 200ed63

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

Source/fmx/WrapFmxGrids.pas

+33-5
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ TPyDelphiGlyphColumn = class(TPyDelphiColumn)
156156
property DelphiObject: TGlyphColumn read GetDelphiObject write SetDelphiObject;
157157
end;
158158

159-
TPyDelphiGlyphCustomGrid = class(TPyDelphiCustomPresentedScrollBox)
159+
TPyDelphiCustomGrid = class(TPyDelphiCustomPresentedScrollBox)
160160
private
161161
function GetDelphiObject: TCustomGrid;
162162
procedure SetDelphiObject(const Value: TCustomGrid);
@@ -166,6 +166,16 @@ TPyDelphiGlyphCustomGrid = class(TPyDelphiCustomPresentedScrollBox)
166166
property DelphiObject: TCustomGrid read GetDelphiObject write SetDelphiObject;
167167
end;
168168

169+
TPyDelphiGrid = class(TPyDelphiCustomGrid)
170+
private
171+
function GetDelphiObject: TGrid;
172+
procedure SetDelphiObject(const Value: TGrid);
173+
public
174+
class function DelphiObjectClass : TClass; override;
175+
// Properties
176+
property DelphiObject: TGrid read GetDelphiObject write SetDelphiObject;
177+
end;
178+
169179
implementation
170180

171181
uses
@@ -211,7 +221,8 @@ procedure TGridsRegistration.RegisterWrappers(
211221
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiFloatColumn);
212222
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiIntegerColumn);
213223
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiGlyphColumn);
214-
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiGlyphCustomGrid);
224+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomGrid);
225+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiGrid);
215226
end;
216227

217228
{ TPyDelphiColumn }
@@ -473,17 +484,34 @@ procedure TPyDelphiGlyphColumn.SetDelphiObject(const Value: TGlyphColumn);
473484

474485
{ TPyDelphiGlyphCustomGrid }
475486

476-
class function TPyDelphiGlyphCustomGrid.DelphiObjectClass: TClass;
487+
class function TPyDelphiCustomGrid.DelphiObjectClass: TClass;
477488
begin
478489
Result := TCustomGrid;
479490
end;
480491

481-
function TPyDelphiGlyphCustomGrid.GetDelphiObject: TCustomGrid;
492+
function TPyDelphiCustomGrid.GetDelphiObject: TCustomGrid;
482493
begin
483494
Result := TCustomGrid(inherited DelphiObject);
484495
end;
485496

486-
procedure TPyDelphiGlyphCustomGrid.SetDelphiObject(const Value: TCustomGrid);
497+
procedure TPyDelphiCustomGrid.SetDelphiObject(const Value: TCustomGrid);
498+
begin
499+
inherited DelphiObject := Value;
500+
end;
501+
502+
{ TPyDelphiGrid }
503+
504+
class function TPyDelphiGrid.DelphiObjectClass: TClass;
505+
begin
506+
Result := TGrid;
507+
end;
508+
509+
function TPyDelphiGrid.GetDelphiObject: TGrid;
510+
begin
511+
Result := TGrid(inherited DelphiObject);
512+
end;
513+
514+
procedure TPyDelphiGrid.SetDelphiObject(const Value: TGrid);
487515
begin
488516
inherited DelphiObject := Value;
489517
end;

0 commit comments

Comments
 (0)