diff --git a/Source/fmx/WrapFmxEdit.pas b/Source/fmx/WrapFmxEdit.pas index 74f60fd9..05a0cee5 100644 --- a/Source/fmx/WrapFmxEdit.pas +++ b/Source/fmx/WrapFmxEdit.pas @@ -5,7 +5,7 @@ interface uses - FMX.Edit, FMX.SearchBox, FMX.ComboEdit, FMX.EditBox, FMX.SpinBox, + FMX.Edit, FMX.SearchBox, FMX.ComboEdit, FMX.EditBox, FMX.SpinBox, FMX.NumberBox, PythonEngine, WrapFmxTypes, WrapFmxControls; @@ -98,6 +98,17 @@ TPyDelphiSpinBox = class(TPyDelphiCustomEditBox) write SetDelphiObject; end; + TPyDelphiNumberBox = class(TPyDelphiCustomEditBox) + private + function GetDelphiObject: TNumberBox; + procedure SetDelphiObject(const Value: TNumberBox); + public + class function DelphiObjectClass: TClass; override; + // Properties + property DelphiObject: TNumberBox read GetDelphiObject + write SetDelphiObject; + end; + implementation uses @@ -136,6 +147,7 @@ procedure TEditRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiComboEdit); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomEditBox); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiSpinBox); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiNumberBox); end; { TPyDelphiCustomEdit } @@ -275,6 +287,23 @@ procedure TPyDelphiSpinBox.SetDelphiObject(const Value: TSpinBox); inherited DelphiObject := Value; end; +{ TPyDelphiNumberBox } + +class function TPyDelphiNumberBox.DelphiObjectClass: TClass; +begin + Result := TNumberBox; +end; + +function TPyDelphiNumberBox.GetDelphiObject: TNumberBox; +begin + Result := TNumberBox(inherited DelphiObject); +end; + +procedure TPyDelphiNumberBox.SetDelphiObject(const Value: TNumberBox); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TEditRegistration.Create);