Custom color for TsTabSheet

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #71169
    Lasse
    Participant

    I wonder is it possible to use a custom color for a skinned tab sheet?

    I would like to optionally be able to color the whole selected tabsheet… it is possible for Vcl Styles.

    Attachments:
    You must be logged in to view attached files.
    #71171
    Support
    Keymaster

    Hello
    If you add these sections to the TsSkinManager.CommonSections:

    [TAB_RED]
    PARENTCLASS=TABTOP
    GRADIENTPERCENT=0
    IMAGEPERCENT=0
    COLOR=11119103
    HOTCOLOR=11119103
    
    [TAB_GREEN]
    PARENTCLASS=TABTOP
    GRADIENTPERCENT=0
    IMAGEPERCENT=0
    COLOR=9371564
    HOTCOLOR=9371564
    
    [TAB_BLUE]
    PARENTCLASS=TABTOP
    GRADIENTPERCENT=0
    IMAGEPERCENT=0
    COLOR=16757129
    HOTCOLOR=16757129
    
    [PANEL_RED]
    PARENTCLASS=PANEL
    BORDERSMASK=NA
    BORDERWIDTH=0
    GRADIENTPERCENT=0
    IMAGEPERCENT=0
    COLOR=11119103
    
    [PANEL_GREEN]
    PARENTCLASS=PANEL
    BORDERSMASK=NA
    BORDERWIDTH=0
    GRADIENTPERCENT=0
    IMAGEPERCENT=0
    COLOR=9371564
    
    [PANEL_BLUE]
    PARENTCLASS=PANEL
    BORDERSMASK=NA
    BORDERWIDTH=0
    GRADIENTPERCENT=0
    IMAGEPERCENT=0
    COLOR=16757129
    

    Then you can choose these sections for tabs in the TsTabsheet.TabSkin property.
    Tabs will be colored in this case. If whole TabSheet must be colored then you can place the TsPanel there and choose the TsPanel.SkinData.Skinsection property. TsPageControl.PageMargins should be changed to -3 for the panels better aligning.
    Here is a demo project attached, I hope it helps.

    Attachments:
    You must be logged in to view attached files.
    #71175
    Lasse
    Participant

    I played with that TsSkinManager.CommonSections a bit and it solves the problem. Thanks a lot.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom color for TsTabSheet’ is closed to new replies.