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?
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:
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.
I was able to find away around modifying all the CSS classes, I was able to put a panel control in the tab and set the background color of the panel. This worked as I was able to set the panel size to 100% of the tab.
This isn't a great solution but it is a way to get around having to use CSS classes to change the background color when we can't create CSS classes for each background color our user is able to select.