Skip to content

Commit 3b4dece

Browse files
committed
Adding the TTextControl wrapper
1 parent a56a9d3 commit 3b4dece

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Source/fmx/WrapFmxControls.pas

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ TPyDelphiStyledControl = class(TPyDelphiControl)
9595
property DelphiObject: TStyledControl read GetDelphiObject write SetDelphiObject;
9696
end;
9797

98+
TPyDelphiTextControl = class(TPyDelphiStyledControl)
99+
private
100+
function GetDelphiObject: TTextControl;
101+
procedure SetDelphiObject(const Value: TTextControl);
102+
public
103+
class function DelphiObjectClass: TClass; override;
104+
// Properties
105+
property DelphiObject: TTextControl read GetDelphiObject write SetDelphiObject;
106+
end;
107+
98108
implementation
99109

100110
type
@@ -402,6 +412,7 @@ procedure TControlsRegistration.RegisterWrappers(
402412
inherited;
403413
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiControl);
404414
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStyledControl);
415+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTextControl);
405416
end;
406417

407418
{ TControlsAccess }
@@ -627,6 +638,23 @@ function TPyDelphiStyledControl.Set_StyleLookup(AValue: PPyObject;
627638
Result := -1;
628639
end;
629640

641+
{ TPyDelphiTextControl }
642+
643+
class function TPyDelphiTextControl.DelphiObjectClass: TClass;
644+
begin
645+
Result := TTextControl;
646+
end;
647+
648+
function TPyDelphiTextControl.GetDelphiObject: TTextControl;
649+
begin
650+
Result := TTextControl(inherited DelphiObject);
651+
end;
652+
653+
procedure TPyDelphiTextControl.SetDelphiObject(const Value: TTextControl);
654+
begin
655+
inherited DelphiObject := Value;
656+
end;
657+
630658
initialization
631659
RegisteredUnits.Add(TControlsRegistration.Create);
632660

0 commit comments

Comments
 (0)