File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,17 @@ TPyDelphiCustomPopupForm = class(TPyDelphiCustomForm)
5050 property DelphiObject: TCustomPopupForm read GetDelphiObject write SetDelphiObject;
5151 end ;
5252
53+ TPyDelphiForm = class (TPyDelphiCustomForm)
54+ private
55+ function GetDelphiObject : TForm;
56+ procedure SetDelphiObject (const Value : TForm);
57+ public
58+ // Class methods
59+ class function DelphiObjectClass : TClass; override;
60+ // Properties
61+ property DelphiObject: TForm read GetDelphiObject write SetDelphiObject;
62+ end ;
63+
5364implementation
5465
5566uses
@@ -94,6 +105,7 @@ procedure TFormsRegistration.RegisterWrappers(
94105 APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCommonCustomForm);
95106 APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomForm);
96107 APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPopupForm);
108+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiForm);
97109end ;
98110
99111{ TPyDelphiApplication }
@@ -166,6 +178,23 @@ procedure TPyDelphiCustomPopupForm.SetDelphiObject(
166178 inherited DelphiObject := Value ;
167179end ;
168180
181+ { TPyDelphiForm }
182+
183+ class function TPyDelphiForm.DelphiObjectClass : TClass;
184+ begin
185+ Result := TForm;
186+ end ;
187+
188+ function TPyDelphiForm.GetDelphiObject : TForm;
189+ begin
190+ Result := TForm(inherited DelphiObject);
191+ end ;
192+
193+ procedure TPyDelphiForm.SetDelphiObject (const Value : TForm);
194+ begin
195+ inherited DelphiObject := Value ;
196+ end ;
197+
169198initialization
170199 RegisteredUnits.Add(TFormsRegistration.Create);
171200
You can’t perform that action at this time.
0 commit comments