Skip to content

Commit ef7c076

Browse files
committed
Introducing the TStatusBar - Embarcadero/DelphiVCL4Python#26
1 parent 2e44f4b commit ef7c076

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

Source/vcl/WrapVclComCtrls.pas

+55
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,24 @@ TPyDelphiCustomTabControl = class (TPyDelphiCustomCustomTabControl)
177177
property DelphiObject: TTabControl read GetDelphiObject write SetDelphiObject;
178178
end;
179179

180+
TPyDelphiCustomStatusBar = class (TPyDelphiWinControl)
181+
private
182+
function GetDelphiObject: TCustomStatusBar;
183+
procedure SetDelphiObject(const Value: TCustomStatusBar);
184+
public
185+
class function DelphiObjectClass : TClass; override;
186+
property DelphiObject: TCustomStatusBar read GetDelphiObject write SetDelphiObject;
187+
end;
188+
189+
TPyDelphiStatusBar = class (TPyDelphiCustomStatusBar)
190+
private
191+
function GetDelphiObject: TStatusBar;
192+
procedure SetDelphiObject(const Value: TStatusBar);
193+
public
194+
class function DelphiObjectClass : TClass; override;
195+
property DelphiObject: TStatusBar read GetDelphiObject write SetDelphiObject;
196+
end;
197+
180198
implementation
181199

182200
uses
@@ -217,6 +235,8 @@ procedure TComCtrlsRegistration.RegisterWrappers(APyDelphiWrapper: TPyDelphiWrap
217235
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiToolbar);
218236
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomCustomTabControl);
219237
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomTabControl);
238+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomStatusBar);
239+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStatusBar);
220240

221241
APyDelphiWrapper.EventHandlers.RegisterHandler(TTabChangingEventHandler);
222242
end;
@@ -864,6 +884,41 @@ procedure TPyDelphiCustomTabControl.SetDelphiObject(const Value: TTabControl);
864884
inherited DelphiObject := Value;
865885
end;
866886

887+
{ TPyDelphiCustomStatusBar }
888+
889+
class function TPyDelphiCustomStatusBar.DelphiObjectClass: TClass;
890+
begin
891+
Result := TCustomStatusBar;
892+
end;
893+
894+
function TPyDelphiCustomStatusBar.GetDelphiObject: TCustomStatusBar;
895+
begin
896+
Result := TCustomStatusBar(inherited DelphiObject);
897+
end;
898+
899+
procedure TPyDelphiCustomStatusBar.SetDelphiObject(
900+
const Value: TCustomStatusBar);
901+
begin
902+
inherited DelphiObject := Value;
903+
end;
904+
905+
{ TPyDelphiStatusBar }
906+
907+
class function TPyDelphiStatusBar.DelphiObjectClass: TClass;
908+
begin
909+
Result := TStatusBar;
910+
end;
911+
912+
function TPyDelphiStatusBar.GetDelphiObject: TStatusBar;
913+
begin
914+
Result := TStatusBar(inherited DelphiObject);
915+
end;
916+
917+
procedure TPyDelphiStatusBar.SetDelphiObject(const Value: TStatusBar);
918+
begin
919+
inherited DelphiObject := Value;
920+
end;
921+
867922
initialization
868923
RegisteredUnits.Add( TComCtrlsRegistration.Create );
869924
{$IFNDEF FPC}

0 commit comments

Comments
 (0)