anchor.diff:    end;
     FreeAndNil(FTabList);
   
  -  FreeAndNil(FBitmapText);
     FreeAndNil(FBitmap);
     inherited;
   end;
   
   procedure TATTabs.Paint;
   begin
  -  if Assigned(FBitmap) then
  -  begin
  -    DoPaintTo(FBitmap.Canvas);
  -    Canvas.CopyRect(ClientRect, FBitmap.Canvas, ClientRect);
  -  end;
  +  if DoubleBuffered then
  +  begin
  +    if Assigned(FBitmap) then
  +    begin
  +      DoPaintTo(FBitmap.Canvas);
  +      Canvas.CopyRect(ClientRect, FBitmap.Canvas, ClientRect);
  +    end;
  +  end
  +  else
  +    DoPaintTo(Canvas);
   end;
   
   procedure TATTabs.DoPaintTabTo(
  
positive.code:   ACloseBtn, AModified: boolean);
  var
    PL1, PL2, PR1, PR2: TPoint;
    RText: TRect;
    NIndentL, NIndentR, NIndentTop: Integer;
    AType: TATTabElemType;
    AInvert: Integer;
  
negative.code:   Forms,
    Math;
  
  function IsDoubleBufferedNeeded: boolean;
  begin
    Result:= false;
  
    {$ifdef windows}
    exit(true);
    {$endif}
  
    {$ifdef darwin}
    exit(false);
    {$endif}
  
    {$ifdef linux}
    exit(false);
    {$endif}
  end;
  
  function _FindControl(Pnt: TPoint): TControl;
  begin
    {$ifdef FPC}
  