Ignore:
Timestamp:
Mar 18, 2011, 11:05:39 AM (14 years ago)
Author:
george
Message:
  • Fixed: PopupForm auto resize on parent resize.
  • Added: Option in popup menu for change visibility of dock panel header.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCDPopupMenu.pas

    r198 r207  
    1616  private
    1717    procedure PopupExecute(Sender: TObject);
     18    procedure PopupMenuHeaderVisibleClick(Sender: TObject);
    1819  public
    1920    Manager: TCDManagerBase;
     
    2122    StyleMenu: TMenuItem;
    2223    LockedMenu: TMenuItem;
     24    HeaderVisibleMenu: TMenuItem;
    2325    constructor Create(AManager: TCDManagerBase);
    2426    procedure UncheckMenuGroup(Item: TMenuItem);
     
    6365  SRenameWindow = 'Rename window';
    6466  SLocked = 'Locked';
    65 
     67  SHeaderVisible = 'Header visible';
    6668
    6769{ TCDPopupMenu }
     
    8284  PositionMenu.Items[Integer(TCDManager(Manager).HeaderPos)].Checked := True;;
    8385  LockedMenu.Checked := TCDManager(Manager).Locked;
     86  HeaderVisibleMenu.Checked := TCDManager(Manager).HeaderVisible;
    8487end;
    8588
     
    173176  LockedMenu.OnClick := PopupMenuLockedClick;
    174177  Items.Add(LockedMenu);
     178
     179  HeaderVisibleMenu := TMenuItem.Create(Self);
     180  HeaderVisibleMenu.Caption := SHeaderVisible;
     181  HeaderVisibleMenu.OnClick := PopupMenuHeaderVisibleClick;
     182  Items.Add(HeaderVisibleMenu);
    175183end;
    176184
     
    323331end;
    324332
     333procedure TCDPopupMenu.PopupMenuHeaderVisibleClick(Sender: TObject);
     334begin
     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;
     343end;
     344
    325345procedure TCDPopupMenu.PopupMenuListClick(Sender: TObject);
    326346begin
Note: See TracChangeset for help on using the changeset viewer.