Skip to content

Commit e98e63a

Browse files
committed
Adding TDateColumn wrapper
1 parent 4860fe2 commit e98e63a

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
@@ -76,6 +76,16 @@ TPyDelphiTimeColumn = class(TPyDelphiColumn)
7676
property DelphiObject: TTimeColumn read GetDelphiObject write SetDelphiObject;
7777
end;
7878

79+
TPyDelphiDateColumn = class(TPyDelphiColumn)
80+
private
81+
function GetDelphiObject: TDateColumn;
82+
procedure SetDelphiObject(const Value: TDateColumn);
83+
public
84+
class function DelphiObjectClass : TClass; override;
85+
// Properties
86+
property DelphiObject: TDateColumn read GetDelphiObject write SetDelphiObject;
87+
end;
88+
7989
implementation
8090

8191
uses
@@ -113,6 +123,7 @@ procedure TGridsRegistration.RegisterWrappers(
113123
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiDateTimeColumnBase);
114124
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiDateTimeColumn);
115125
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTimeColumn);
126+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiDateColumn);
116127
end;
117128

118129
{ TPyDelphiColumn }
@@ -235,6 +246,23 @@ procedure TPyDelphiTimeColumn.SetDelphiObject(const Value: TTimeColumn);
235246
inherited DelphiObject := Value;
236247
end;
237248

249+
{ TPyDelphiDateColumn }
250+
251+
class function TPyDelphiDateColumn.DelphiObjectClass: TClass;
252+
begin
253+
Result := TDateColumn;
254+
end;
255+
256+
function TPyDelphiDateColumn.GetDelphiObject: TDateColumn;
257+
begin
258+
Result := TDateColumn(inherited DelphiObject);
259+
end;
260+
261+
procedure TPyDelphiDateColumn.SetDelphiObject(const Value: TDateColumn);
262+
begin
263+
inherited DelphiObject := Value;
264+
end;
265+
238266
initialization
239267
RegisteredUnits.Add(TGridsRegistration.Create);
240268

0 commit comments

Comments
 (0)