Ignore:
Timestamp:
Mar 9, 2011, 2:11:40 PM (14 years ago)
Author:
george
Message:
  • Added: Default layout initialization in Demo IDE.
  • Fixed: Tab position switching through popup menu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCoolDockStyleTabs.pas

    r177 r182  
    77uses
    88  Classes, Controls, ExtCtrls, ComCtrls, SysUtils, Dialogs,
    9   Menus, UCoolDockStyle, Forms, UCoolDockClientPanel;
     9  Menus, UCoolDockStyle, Forms, UCoolDockClientPanel, UCoolDockCommon;
    1010
    1111type
     
    3333      AControl: TControl; InsertAt: TAlign);
    3434  public
    35     constructor Create(AManager: TObject);
     35    constructor Create(AManager: TCoolDockManagerBase);
    3636    procedure SetVisible(const AValue: Boolean); override;
    3737    destructor Destroy; override;
     
    7878    then
    7979    begin
    80       TCoolDockClientPanel(DockPanels[I]).Control.Tag := 1;
     80      TCoolDockClientPanel(DockPanels[I]).Control.Tag := Integer(dhtTemporal);
    8181      TCoolDockClientPanel(DockPanels[I]).Control.Hide;
    8282      TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Hide;
     
    138138end;
    139139
    140 constructor TCoolDockStyleTabs.Create(AManager: TObject);
     140constructor TCoolDockStyleTabs.Create(AManager: TCoolDockManagerBase);
    141141var
    142142  NewMenuItem: TMenuItem;
     
    243243      with TCoolDockClientPanel(DockPanels[PageControl.TabIndex]) do begin
    244244        //Show;
    245         if AValue and (not Control.Visible) and (Control.Tag = 1)  then begin
     245        //ShowMessage(IntToStr(Control.Tag));
     246        if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal))  then begin
    246247          Control.Show;
    247           Control.Tag := 0;
     248          Control.Tag := Integer(dhtPermanent);
    248249        end;
    249250        //TabControl.Show;
     
    273274
    274275        I := DockPanels.IndexOf(FindControlInPanels(Control));
    275         if Control.Tag = 0 then
     276        if Control.Tag = Integer(dhtPermanent) then
    276277        if I <> -1 then
    277278  //        Control.Hide;
    278279          PageControl.Page[I].TabVisible := False;
    279         Control.Tag := 0;
     280        //Control.Tag := 0;
    280281//      end;
    281282    end;
Note: See TracChangeset for help on using the changeset viewer.