|
5 | 5 | interface
|
6 | 6 |
|
7 | 7 | uses
|
8 |
| - FMX.Edit, FMX.SearchBox, FMX.ComboEdit, FMX.EditBox, FMX.SpinBox, |
| 8 | + FMX.Edit, FMX.SearchBox, FMX.ComboEdit, FMX.EditBox, FMX.SpinBox, FMX.NumberBox, |
9 | 9 | PythonEngine, WrapFmxTypes, WrapFmxControls;
|
10 | 10 |
|
11 | 11 |
|
@@ -98,6 +98,17 @@ TPyDelphiSpinBox = class(TPyDelphiCustomEditBox)
|
98 | 98 | write SetDelphiObject;
|
99 | 99 | end;
|
100 | 100 |
|
| 101 | + TPyDelphiNumberBox = class(TPyDelphiCustomEditBox) |
| 102 | + private |
| 103 | + function GetDelphiObject: TNumberBox; |
| 104 | + procedure SetDelphiObject(const Value: TNumberBox); |
| 105 | + public |
| 106 | + class function DelphiObjectClass: TClass; override; |
| 107 | + // Properties |
| 108 | + property DelphiObject: TNumberBox read GetDelphiObject |
| 109 | + write SetDelphiObject; |
| 110 | + end; |
| 111 | + |
101 | 112 | implementation
|
102 | 113 |
|
103 | 114 | uses
|
@@ -136,6 +147,7 @@ procedure TEditRegistration.RegisterWrappers(
|
136 | 147 | APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiComboEdit);
|
137 | 148 | APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomEditBox);
|
138 | 149 | APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiSpinBox);
|
| 150 | + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiNumberBox); |
139 | 151 | end;
|
140 | 152 |
|
141 | 153 | { TPyDelphiCustomEdit }
|
@@ -275,6 +287,23 @@ procedure TPyDelphiSpinBox.SetDelphiObject(const Value: TSpinBox);
|
275 | 287 | inherited DelphiObject := Value;
|
276 | 288 | end;
|
277 | 289 |
|
| 290 | +{ TPyDelphiNumberBox } |
| 291 | + |
| 292 | +class function TPyDelphiNumberBox.DelphiObjectClass: TClass; |
| 293 | +begin |
| 294 | + Result := TNumberBox; |
| 295 | +end; |
| 296 | + |
| 297 | +function TPyDelphiNumberBox.GetDelphiObject: TNumberBox; |
| 298 | +begin |
| 299 | + Result := TNumberBox(inherited DelphiObject); |
| 300 | +end; |
| 301 | + |
| 302 | +procedure TPyDelphiNumberBox.SetDelphiObject(const Value: TNumberBox); |
| 303 | +begin |
| 304 | + inherited DelphiObject := Value; |
| 305 | +end; |
| 306 | + |
278 | 307 | initialization
|
279 | 308 | RegisteredUnits.Add(TEditRegistration.Create);
|
280 | 309 |
|
|
0 commit comments