### Set Thumb Color

Example Sub Routine for setting the color of the Slider Thumb.
The slider is created with the B4J Visual Designer and added to the B4J Code.
The color is set using API methods (requires the JavaObject library).
`Sub Process_Globals
Private Slider1 As Slider
End Sub`
' Set the color of the slider thumb using RGB values
' Example: setSliderThumbColorRGB(Slider1, 0,255,0) which sets the thumb color to green.
`Sub SetSliderThumbColorRGB(slr As Slider, r As Int, g As Int, b As Int)
Dim joSlr As JavaObject = slr
joSlr.RunMethodJo("lookup", Array(".thumb")).RunMethod("setStyle", Array($"-fx-background-color:rgb(${r},${g},${b});"$))
End Sub`

Changed: , Category: Slider, File: T6C249M1798.htm, ID: 1798