|
3 | 3 | interface |
4 | 4 |
|
5 | 5 | uses |
6 | | - FMX.Forms, PythonEngine, WrapDelphiClasses, WrapFmxTypes; |
| 6 | + FMX.Forms, PythonEngine, WrapDelphiClasses, WrapFmxTypes, WrapFmxControls; |
7 | 7 |
|
8 | 8 | type |
9 | 9 | TPyDelphiApplication = class(TPyDelphiComponent) |
@@ -61,6 +61,17 @@ TPyDelphiForm = class(TPyDelphiCustomForm) |
61 | 61 | property DelphiObject: TForm read GetDelphiObject write SetDelphiObject; |
62 | 62 | end; |
63 | 63 |
|
| 64 | + TPyDelphiFrame = class(TPyDelphiControl) |
| 65 | + private |
| 66 | + function GetDelphiObject: TFrame; |
| 67 | + procedure SetDelphiObject(const Value: TFrame); |
| 68 | + public |
| 69 | + // Class methods |
| 70 | + class function DelphiObjectClass: TClass; override; |
| 71 | + // Properties |
| 72 | + property DelphiObject: TFrame read GetDelphiObject write SetDelphiObject; |
| 73 | + end; |
| 74 | + |
64 | 75 | implementation |
65 | 76 |
|
66 | 77 | uses |
@@ -106,6 +117,7 @@ procedure TFormsRegistration.RegisterWrappers( |
106 | 117 | APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomForm); |
107 | 118 | APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPopupForm); |
108 | 119 | APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiForm); |
| 120 | + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiFrame); |
109 | 121 | end; |
110 | 122 |
|
111 | 123 | { TPyDelphiApplication } |
@@ -195,6 +207,23 @@ procedure TPyDelphiForm.SetDelphiObject(const Value: TForm); |
195 | 207 | inherited DelphiObject := Value; |
196 | 208 | end; |
197 | 209 |
|
| 210 | +{ TPyDelphiFrame } |
| 211 | + |
| 212 | +class function TPyDelphiFrame.DelphiObjectClass: TClass; |
| 213 | +begin |
| 214 | + Result := TFrame; |
| 215 | +end; |
| 216 | + |
| 217 | +function TPyDelphiFrame.GetDelphiObject: TFrame; |
| 218 | +begin |
| 219 | + Result := TFrame(inherited DelphiObject); |
| 220 | +end; |
| 221 | + |
| 222 | +procedure TPyDelphiFrame.SetDelphiObject(const Value: TFrame); |
| 223 | +begin |
| 224 | + inherited DelphiObject := Value; |
| 225 | +end; |
| 226 | + |
198 | 227 | initialization |
199 | 228 | RegisteredUnits.Add(TFormsRegistration.Create); |
200 | 229 |
|
|
0 commit comments