Changeset 114


Ignore:
Timestamp:
Jan 5, 2011, 7:51:16 AM (13 years ago)
Author:
george
Message:
  • Fixed: CoolDocking was not showing tab content on tab switch.
Files:
1 added
5 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;
  • Generics/TemplateGenerics/Generic/GenericList.inc

    r112 r114  
    33  TGList = class;
    44
    5   TGListSortCompare = function(const Item1, Item2: TGListItem): Integer of object;
     5  TGListSortCompare = function(Item1, Item2: TGListItem): Integer of object;
    66  TGListToStringConverter = function(Item: TGListItem): string;
    77  TGListFromStringConverter = function(Text: string): TGListItem;
     
    9191    IncSize := NewCapacity - Capacity;
    9292    // Expand
    93     if FCount = Capacity then begin
     93    if IncSize = 1 then begin
    9494      IncSize := 4;
    9595      if Capacity > 3 then IncSize := IncSize + 4;
    9696      if Capacity > 8 then IncSize := IncSize + 8;
    9797      if Capacity > 63 then IncSize := IncSize + Capacity shr 2; // Grow by one quarter
    98       Capacity := Capacity + IncSize;
    99     end;
     98    end;
     99    Capacity := Capacity + IncSize;
    100100  end else
    101101  if NewCapacity < Capacity then begin
  • Generics/TemplateGenerics/ReadMe.txt

    r109 r114  
    1010Email: robie@centrum.cz
    1111
     12
     13Main subversion repository:
     14http://svn.zdechov.net/svn/PascalClassLibrary/Generics/TemplateGenerics
Note: See TracChangeset for help on using the changeset viewer.