### Set TabPage Colors

To set the Tab color, make use of API methods (requires the JavaObject library).
Reference: https://docs.oracle.com/javafx/2/api/javafx/scene/control/TabPane.html
'Set the background color of a tab. Uses the CSSUtils library.
'Example `SetTabBackgroundColor(tp1, fx.Colors.red)`
`Sub SetTabBackgroundColor(tp As TabPage, color As Paint)
Dim jo As JavaObject = tp
jo.RunMethod("setStyle", Array("-fx-background-color: " & CSSUtils.ColorToHex(color)))
End Sub`
'Set the color of the tabpage. Uses the CSSUtils library.
'Example SetTabPageBackgroundColor(fx.Colors.Cyan)
`Sub SetTabPageBackgroundColor(color As Paint)
Log("TabPage set background color")
If tpMain.Tabs.Size = 0 Then Return
Dim tp As TabPage = tpMain.SelectedItem
tp.Content.Style = $"-fx-background-color: ${CSSUtils.ColorToHex(color)};"$
End Sub`

Changed: , Category: TabPage and TabPane, File: T6C260M1918.htm, ID: 1918