Change Color/Skin of TsTabControl

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33089
    Andi_D
    Participant

    I'd like to change the skin of one or more Tabs of a TsTabcontrol component.

    following i tried:

    ownerdraw:=true;

    procedure TForm1.sTabControl1DrawTab(Control: TCustomTabControl;
    TabIndex: Integer; const Rect: TRect; Active: Boolean);
    begin
    control.canvas.Brush.color:=clred;
    control.Canvas.FillRect(rect);
    end;

    this works fine BUT:

    i do not like to use “normal” colors – i'd like to use “skined” colors!!
    the problem i'll think is: …. control.canvas.Brush.color:= ????

    can anyone help me please??

    many thanks!!!

    ps: my english is not the best – sorry.

    #39861
    Support
    Keymaster

    Hello

    Any skin element may have a color for filling, but in some skins this element may be filled by gradient or by texture.
    So, tab may be filled by gradient and tab will not have own color in this case.

    I can suggest you to use a main skin color which you can receive by TsSkinManager.GetGlobalColor function.
    Color of text for such tab may be received by TsSkinManager.GetGlobalFontColor

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.