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
245
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?