Skip to content

Commit 0b04a65

Browse files
committed
Adding TStringGrid wrapper
1 parent 200ed63 commit 0b04a65

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Source/fmx/WrapFmxGrids.pas

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,16 @@ TPyDelphiGrid = class(TPyDelphiCustomGrid)
176176
property DelphiObject: TGrid read GetDelphiObject write SetDelphiObject;
177177
end;
178178

179+
TPyDelphiStringGrid = class(TPyDelphiCustomGrid)
180+
private
181+
function GetDelphiObject: TStringGrid;
182+
procedure SetDelphiObject(const Value: TStringGrid);
183+
public
184+
class function DelphiObjectClass : TClass; override;
185+
// Properties
186+
property DelphiObject: TStringGrid read GetDelphiObject write SetDelphiObject;
187+
end;
188+
179189
implementation
180190

181191
uses
@@ -223,6 +233,7 @@ procedure TGridsRegistration.RegisterWrappers(
223233
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiGlyphColumn);
224234
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomGrid);
225235
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiGrid);
236+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStringGrid);
226237
end;
227238

228239
{ TPyDelphiColumn }
@@ -516,6 +527,23 @@ procedure TPyDelphiGrid.SetDelphiObject(const Value: TGrid);
516527
inherited DelphiObject := Value;
517528
end;
518529

530+
{ TPyDelphiStringGrid }
531+
532+
class function TPyDelphiStringGrid.DelphiObjectClass: TClass;
533+
begin
534+
Result := TStringGrid;
535+
end;
536+
537+
function TPyDelphiStringGrid.GetDelphiObject: TStringGrid;
538+
begin
539+
Result := TStringGrid(inherited DelphiObject);
540+
end;
541+
542+
procedure TPyDelphiStringGrid.SetDelphiObject(const Value: TStringGrid);
543+
begin
544+
inherited DelphiObject := Value;
545+
end;
546+
519547
initialization
520548
RegisteredUnits.Add(TGridsRegistration.Create);
521549

0 commit comments

Comments
 (0)