Skip to content

Commit 76784fc

Browse files
committed
Adding TStringColumn wrapper
1 parent 34599a6 commit 76784fc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Source/fmx/WrapFmxGrids.pas

+28
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ TPyDelphiColumn = class(TPyDelphiControl)
1616
property DelphiObject: TColumn read GetDelphiObject write SetDelphiObject;
1717
end;
1818

19+
TPyDelphiStringColumn = class(TPyDelphiColumn)
20+
private
21+
function GetDelphiObject: TStringColumn;
22+
procedure SetDelphiObject(const Value: TStringColumn);
23+
public
24+
class function DelphiObjectClass : TClass; override;
25+
// Properties
26+
property DelphiObject: TStringColumn read GetDelphiObject write SetDelphiObject;
27+
end;
28+
1929
implementation
2030

2131
uses
@@ -47,6 +57,7 @@ procedure TGridsRegistration.RegisterWrappers(
4757
begin
4858
inherited;
4959
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiColumn);
60+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStringColumn);
5061
end;
5162

5263
{ TPyDelphiColumn }
@@ -66,6 +77,23 @@ procedure TPyDelphiColumn.SetDelphiObject(const Value: TColumn);
6677
inherited DelphiObject := Value;
6778
end;
6879

80+
{ TPyDelphiStringColumn }
81+
82+
class function TPyDelphiStringColumn.DelphiObjectClass: TClass;
83+
begin
84+
Result := TStringColumn;
85+
end;
86+
87+
function TPyDelphiStringColumn.GetDelphiObject: TStringColumn;
88+
begin
89+
Result := TStringColumn(inherited DelphiObject);
90+
end;
91+
92+
procedure TPyDelphiStringColumn.SetDelphiObject(const Value: TStringColumn);
93+
begin
94+
inherited DelphiObject := Value;
95+
end;
96+
6997
initialization
7098
RegisteredUnits.Add(TGridsRegistration.Create);
7199

0 commit comments

Comments
 (0)