Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
Change Tab Header Background Color
posted

I'm creating the tabs at run time and with the old UltraWebTab I was able to change the background color and it seems like the WebTab in version 16.2 isn't able to change the background color, is this true or am I doing something wrong in my code:

Dim NewTab As New Infragistics.Web.UI.LayoutControls.ContentTabItem

' set Properties of the Tab

NewTab.AutoSize = Infragistics.Web.UI.DefaultableBoolean.True

'TODO - background color isn't able to be changed at runtime even though the properties are there

Dim Color As Color = Functions.BgrToRgb(DocTab.BGRTabColor)

Dim HexColor As String = Functions.HexFromRGB(Color.R, Color.G, Color.B)

NewTab.BackColor = Color

NewTab.Style.Item("background-color") = HexColor

Neither of the last 2 lines work, I'm not able to create CSS classes as these colors are retrieved from the database DocTab object.

Is there a way of setting the background color during runtime?

Parents
  • 25065
    Offline posted

    Hello,

    Thank you for contacting Infragistics!

    The reason you have been unable to change the background color is the Tab uses a series of images for background, Here is a list including what CSS class they are in:

    .igtab_THHolder
    images/igtab_HolderBorder.gif

    .igtab_THTab
    images/igtab_THLeft.gif

    .igtab_THTab
    images/igtab_THCenter.jpg

    igtab_THTail
    images/igtab_THRight.gif

    igtab_THTailSel
    images/igtab_THRightSel.gif

    igtab_THTailHov
    images/igtab_THRightHov.gif

    You would want to either change the images or change the styles so those images are no longer used. Also not the igtab_THCenter CSS class applies a background-color you may have to overwrite.

Reply Children
No Data