Ignore:
Timestamp:
Apr 27, 2012, 8:34:10 AM (13 years ago)
Author:
chronos
Message:
  • Modified: Change concept of dock manager items logical visibility vs TControl real visibility. Not visible controls are hidden by manager using TCDManager.DockSiteVisible property. TCDManager provide events OnDockSiteHide and OnDockSiteShow for handling logical visibility.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r354 r355  
    8787      Update;
    8888      Switch(DockItems.IndexOf(FindControlInPanels(TControl(Sender))));
    89       TCDManagerTabsItem(DockItems[DockItems.IndexOf(
    90         FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent;
     89      //TCDManagerTabsItem(DockItems[DockItems.IndexOf(
     90      //  FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent;
    9191    end else Update;
    9292  end;
     
    124124  inherited;
    125125  if (PageControl.TabIndex >= 0) and (PageControl.TabIndex < DockItems.Count) then
    126     with TCDManagerItem(DockItems[PageControl.TabIndex]) do begin
    127       if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal)) then begin
    128         Control.Show;
    129         Control.Tag := Integer(dhtPermanent);
    130       end;
    131     end;
     126    with TCDManagerItem(DockItems[PageControl.TabIndex]) do
     127      TCDManager(Control.DockManager).DockSiteVisible := True;
    132128end;
    133129
     
    399395    Control.Align := alClient;
    400396    if PageControl.PageIndex = I then begin
    401       if (not Control.Visible) and (HideType = dhtTemporal) then
    402         Control.Visible := True;
     397      TCDManager(Control.DockManager).DockSiteVisible := True;
     398      if not Control.Visible then Control.Show;
    403399    end else begin
    404       if Control.Visible then begin
    405         HideType := dhtTemporal;
    406         Control.Visible := False;
    407       end;
    408     end;
    409     PageControl.Pages[I].TabVisible := Control.Visible or (HideType = dhtTemporal);
     400      TCDManager(Control.DockManager).DockSiteVisible := False;
     401    end;
     402    PageControl.Pages[I].TabVisible := Control.Visible;
    410403
    411404    //TCDClientPanel(DockPanels[I]).ClientAreaPanel.Width := DockSite.Width;
Note: See TracChangeset for help on using the changeset viewer.