diff --git a/Packages/X2CLMenuBarEditor.pas b/Packages/X2CLMenuBarEditor.pas index 1f73514..966193e 100644 --- a/Packages/X2CLMenuBarEditor.pas +++ b/Packages/X2CLMenuBarEditor.pas @@ -89,9 +89,6 @@ var GEditors: TObjectBucketList; -type - TProtectedX2CustomMenuBar = class(TX2CustomMenuBar); - {$R *.dfm} @@ -517,8 +514,8 @@ begin if FDesignerAttached or (not Assigned(MenuBar)) then exit; - TProtectedX2CustomMenuBar(MenuBar).Designer := Self; - FDesignerAttached := True; + MenuBar.Designer := Self; + FDesignerAttached := True; end; @@ -529,7 +526,7 @@ begin FDesignerAttached := False; if Assigned(MenuBar) then - TProtectedX2CustomMenuBar(MenuBar).Designer := nil; + MenuBar.Designer := nil; end; diff --git a/Source/X2CLMenuBar.pas b/Source/X2CLMenuBar.pas index 40ae82e..66bde7c 100644 --- a/Source/X2CLMenuBar.pas +++ b/Source/X2CLMenuBar.pas @@ -468,8 +468,6 @@ type procedure TestMousePos(); virtual; function GetMenuHeight(): Integer; virtual; - - property Designer: IX2MenuBarDesigner read FDesigner write FDesigner; protected procedure SetPainter(const Value: TX2CustomMenuBarPainter); virtual; @@ -574,6 +572,8 @@ type property Images: TCustomImageList read FImages write SetImages; property Painter: TX2CustomMenuBarPainter read FPainter write SetPainter; property SelectedItem: TX2CustomMenuBarItem read FSelectedItem write SetSelectedItem; + + property Designer: IX2MenuBarDesigner read FDesigner write FDesigner; end;