Changeset 114 for Docking/CoolDocking


Ignore:
Timestamp:
Jan 5, 2011, 7:51:16 AM (14 years ago)
Author:
george
Message:
  • Fixed: CoolDocking was not showing tab content on tab switch.
Location:
Docking/CoolDocking
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCoolDockStyle.pas

    r103 r114  
    2323    procedure Switch(Index: Integer); virtual;
    2424    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); virtual;
     25    procedure SetVisible(const AValue: Boolean); virtual;
    2526    property HeaderPos: THeaderPos read GetHeaderPos write SetHeaderPos;
     27    property Visible: Boolean write SetVisible;
    2628  end;
    2729
     
    3234
    3335{ TCoolDockStyle }
     36
     37procedure TCoolDockStyle.SetVisible(const AValue: Boolean);
     38begin
     39
     40end;
    3441
    3542function TCoolDockStyle.GetHeaderPos: THeaderPos;
  • Docking/CoolDocking/UCoolDockStyleTabs.pas

    r103 r114  
    3232  public
    3333    constructor Create(AManager: TObject);
     34    procedure SetVisible(const AValue: Boolean); override;
    3435    destructor Destroy; override;
    3536    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override;
     
    208209end;
    209210
     211procedure TCoolDockStyleTabs.SetVisible(const AValue: Boolean);
     212begin
     213  inherited SetVisible(AValue);
     214  with TCoolDockManager(Manager) do
     215    if (TabControl.TabIndex >= 0) and (TabControl.TabIndex < DockPanels.Count) then
     216      with TCoolDockClientPanel(DockPanels[TabControl.TabIndex]) do begin
     217        //Show;
     218        if AValue then Control.Show;
     219        //TabControl.Show;
     220        //ClientAreaPanel.Show;
     221      end;
     222end;
     223
    210224procedure TCoolDockStyleTabs.ChangeVisible(Control: TWinControl; Visible: Boolean);
    211225var
     
    216230  if Assigned(TWinControl(Control).DockManager) then
    217231  with TCoolDockManager(TWinControl(Control).DockManager) do begin
    218 //    ShowMessage(IntToStr(DockPanels.Count));
     232//    ShowMessage(IntToStr(TabControl.TabIndex) + ' ' + IntToStr(DockPanels.Count));
     233//    TabControl.Tabs[0].;
     234//    if (TabControl.TabIndex >= 0) and (TabControl.TabIndex < DockPanels.Count) then begin
     235//      TCoolDockClientPanel(DockPanels[TabControl.TabIndex]).Show;
     236//      TCoolDockClientPanel(DockPanels[TabControl.TabIndex]).Control.Show;
     237//    end;
     238    //    ShowMessage(IntToStr(DockPanels.Count));
    219239  end;
    220240end;
  • Docking/CoolDocking/UCoolDocking.pas

    r103 r114  
    544544  I: Integer;
    545545begin
     546  DockStyleHandler.Visible := AValue;
    546547//  for I := 0 to DockPanels.Count - 1 do
    547548//    TCoolDockClientPanel(DockPanels[I]).Visible := AValue;
Note: See TracChangeset for help on using the changeset viewer.