Ignore:
Timestamp:
May 19, 2011, 3:14:19 PM (14 years ago)
Author:
george
Message:
File:
1 edited

Legend:

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

    r233 r244  
    218218begin
    219219  inherited PaintSite(DC);
    220   PageControl.Invalidate;
     220  //PageControl.Invalidate;
    221221end;
    222222
     
    333333  I: Integer;
    334334  NewTabSheet: TTabSheet;
     335  DeletedPage: TTabSheet;
    335336begin
    336337  for I := 0 to DockItems.Count - 1 do
     
    338339    //Control.Tag := Integer(dhtTemporal);
    339340    //Control.Visible := False;
    340     //Control.Parent := nil;
     341    //if I >= DockItems.Count then
     342    //  Control.Parent := nil;
    341343  end;
    342344
     
    344346//    TCDManagerTabsItem(DockItems[DockItems.Count - 1]).Control.Visible := False;
    345347//    TCDManagerTabsItem(DockItems[DockItems.Count - 1]).Control.Parent := nil;
    346     //PageControl.Pages[PageControl.PageCount - 1].Parent := nil;
    347     PageControl.Pages[PageControl.PageCount - 1].Free;
     348
     349    PageControl.OnChange := nil;
     350    DeletedPage := PageControl.Pages[PageControl.PageCount - 1];
     351    DeletedPage.Parent := nil;
     352    PageControl.OnChange := TabControlChange;
     353    DeletedPage.Free;
    348354    TabImageList.Delete(TabImageList.Count - 1);
    349355  end;
     
    359365    PageControl.Pages[I].ImageIndex := I;
    360366    TabImageList.Replace(I, IconImage.Picture.Bitmap, nil);
     367    //if (I < PageControl.PageCount) and Assigned(PageControl.Pages[I]) then
    361368    Control.Parent := PageControl.Pages[I];
    362369    Control.Align := alClient;
Note: See TracChangeset for help on using the changeset viewer.