I set the TPageControl Style to Flat Buttons (`tsFlatButtons`), and change the tab's button color using the `OnDrawTab` event.

It works, but the button that is not-active has grey (btnFace color) border!
![enter image description here](https://i.stack.imgur.com/ilXjG.png)

Any idea how to fix this?

```
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;

```