title: Trouble with TPageControl DrawTab
body: <p>I set the TPageControl Style to Flat Buttons (<code>tsFlatButtons</code>), and change the tab's button color using the <code>OnDrawTab</code> event.</p>
  
  <p>It works, but the button that is not-active has grey (btnFace color) border!
  <img src="https://i.stack.imgur.com/ilXjG.png" alt="enter image description here"></p>
  
  <p>Any idea how to fix this?</p>
  
  <pre><code>procedure TForm1.PageControlDrawTab(Control: TCustomTabControl;
            TabIndex: Integer; const Rect: TRect; Active: Boolean);
  
  var
    AText: string;
    ARect: TRect;
  
  begin
    with (Control as TPageControl).Canvas do
    begin
      ARect := Rect;
      OffsetRect(ARect, 0, 4);
  
      Brush.Color := COLOR1;
      FillRect(Rect);
  
      AText := TPageControl(Control).Pages[TabIndex].Caption;
  
      with Control.Canvas do   
        DrawText(Control.Canvas.Handle, PChar(AText), -1,ARect, DT_CENTER or DT_SINGLELINE);
  
    end;
  end;
  </code></pre>