Ignore:
Timestamp:
Mar 22, 2011, 8:20:18 AM (13 years ago)
Author:
george
Message:
  • Fixed: Tabs in TCDManagerTabs PageControl visibility update. If Control is hided it will not be visibled as tab but stay docked for later showing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCDManager.pas

    r209 r215  
    6464  TCDManagerItem = class
    6565  private
     66    function GetHideType: TCDHideType;
    6667    procedure ResizeExecute(Sender: TObject);
     68    procedure SetHideType(const AValue: TCDHideType);
    6769  public
    6870    Control: TControl;
     
    7476    constructor Create; virtual;
    7577    destructor Destroy; override;
     78    property HideType: TCDHideType read GetHideType write SetHideType;
    7679  end;
    7780
     
    240243end;
    241244
     245function TCDManagerItem.GetHideType: TCDHideType;
     246begin
     247  Result := TCDHideType(Control.Tag);
     248end;
     249
    242250procedure TCDManagerItem.ResizeExecute(Sender: TObject);
    243251begin
     
    252260end;
    253261
     262procedure TCDManagerItem.SetHideType(const AValue: TCDHideType);
     263begin
     264  Control.Tag := Integer(AValue);
     265end;
     266
    254267procedure TCDManagerItem.DockPanelMouseDown(Sender: TObject;
    255268  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     
    277290
    278291procedure TCDManagerItem.VisibleChange(Sender: TObject);
    279 var
    280   ControlVisible: Boolean;
    281   Temp: TControl;
    282   Temp2: TControl;
    283 begin
    284 
    285 {  Temp := TControl(Sender);
    286   if Assigned(Control) then
    287   begin
    288     ControlVisible := TControl(Sender).Visible;
    289     (*if Assigned(ClientAreaPanel) then
    290       ClientAreaPanel.Visible := ControlVisible;
    291     if Assigned(Splitter) then
    292       Splitter.Visible := ControlVisible;
    293       *)
    294 //    if Assigned(TCDManager(OwnerDockManager).DockStyleHandler) then
    295     if Assigned(Manager) then
    296     with TCDManager(Manager) do
    297     begin
    298       //UpdateClientSize;
    299       if ControlVisible then
    300         Switch(DockItems.IndexOf(FindControlInPanels(TControl(Sender))));
    301       if not (Control is TWinControl) then raise Exception.Create('Not TWinControl');
    302       if not Assigned(Control) then raise Exception.Create('Control not assigned');
    303       ChangeVisible(TWinControl(Control), ControlVisible);
    304       // Show parent control
    305       Temp := TControl(Sender).HostDockSite;
    306 
    307       if ControlVisible then
    308         TControl(Sender).HostDockSite.Visible := ControlVisible;
    309     end;
    310     if csDestroying in Control.ComponentState then Control := nil;
    311   end;}
     292begin
    312293end;
    313294
Note: See TracChangeset for help on using the changeset viewer.