Changeset 207 for Docking/CoolDocking/UCDPopupMenu.pas
- Timestamp:
- Mar 18, 2011, 11:05:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCDPopupMenu.pas
r198 r207 16 16 private 17 17 procedure PopupExecute(Sender: TObject); 18 procedure PopupMenuHeaderVisibleClick(Sender: TObject); 18 19 public 19 20 Manager: TCDManagerBase; … … 21 22 StyleMenu: TMenuItem; 22 23 LockedMenu: TMenuItem; 24 HeaderVisibleMenu: TMenuItem; 23 25 constructor Create(AManager: TCDManagerBase); 24 26 procedure UncheckMenuGroup(Item: TMenuItem); … … 63 65 SRenameWindow = 'Rename window'; 64 66 SLocked = 'Locked'; 65 67 SHeaderVisible = 'Header visible'; 66 68 67 69 { TCDPopupMenu } … … 82 84 PositionMenu.Items[Integer(TCDManager(Manager).HeaderPos)].Checked := True;; 83 85 LockedMenu.Checked := TCDManager(Manager).Locked; 86 HeaderVisibleMenu.Checked := TCDManager(Manager).HeaderVisible; 84 87 end; 85 88 … … 173 176 LockedMenu.OnClick := PopupMenuLockedClick; 174 177 Items.Add(LockedMenu); 178 179 HeaderVisibleMenu := TMenuItem.Create(Self); 180 HeaderVisibleMenu.Caption := SHeaderVisible; 181 HeaderVisibleMenu.OnClick := PopupMenuHeaderVisibleClick; 182 Items.Add(HeaderVisibleMenu); 175 183 end; 176 184 … … 323 331 end; 324 332 333 procedure TCDPopupMenu.PopupMenuHeaderVisibleClick(Sender: TObject); 334 begin 335 if PopupComponent is TPageControl then 336 with TPageControl(PopupComponent) do begin 337 TCDManagerTabs(Manager).HeaderVisible := not TCDManagerTabs(Manager).HeaderVisible; 338 end else 339 if PopupComponent is TCDHeader then 340 with TCDHeader(PopupComponent) do begin 341 TCDManagerTabs(Manager).HeaderVisible := not TCDManagerTabs(Manager).HeaderVisible; 342 end; 343 end; 344 325 345 procedure TCDPopupMenu.PopupMenuListClick(Sender: TObject); 326 346 begin
Note:
See TracChangeset
for help on using the changeset viewer.