### Set StyleClass using JavaObject

Change the color of the bar of a progresbar by using a JavaObject.
'Set the color of progressbar
'Parameter: ProgressBar, Color as string
'Examples:
'Private MainForm As Form
'setProgressBarColor(pbMain, "red")
'setProgressBarColor(pbMain, "green")
`Sub setProgressBarColor(pb As ProgressBar, color As String)
Dim joPB As JavaObject = pb
joPB.RunMethodJo("lookup", Array(".bar")).RunMethod("setStyle", Array("-fx-background-color: " & color & ";"))
'Example using color direct: joPB.RunMethodJo("lookup", Array(".bar")).RunMethod("setStyle", Array("-fx-background-color: green;"))
End Sub`

Changed: , Category: ProgressBar, File: T6C232M1702.htm, ID: 1702