### Set or get Progressvalue

To set or get the progressvalue of a progressbar use JavaObject Methods.
Reference: http://docs.oracle.com/javafx/2/api/javafx/scene/control/ProgressIndicator.html
' Set the value of a progressbar
' Parameter ProgressBar as node
' Parameter Value between 0 and 1 to set as double
' Example: setProgressBarValue(progressbarMain, 0.90)
`Sub setProgressBarValue(pb As Node, value As Double)
If (value < 0) OR (value > 1) Then Return
Dim P As JavaObject = pb
Dim progress As Double = value
P.RunMethod("setProgress",Array As Object(progress))
End Sub`
' Get the value of a progressbar
' Parameter ProgressBar as node
' Returns Value between 0 and 1 as double
' Example: "Progressbar: " & (getProgressBarValue(progressbarMain) * 100) & "%"
`Sub getProgressBarValue(pb As Node) As Double
Dim P As JavaObject = pb
Return P.RunMethod("getProgress",Null)
End Sub`
In addition to set the style:
' Set the style of a progressbar
' Parameter ProgressBar as node
' Parameter Style CSS
' Example: setProgressBarStyle(progressbarMain, "-fx-box-border: black; -fx-accent: red;")
`Sub setProgressBarStyle(pb As Node, s As String)
Dim P As JavaObject = pb
P.RunMethod("setStyle",Array As Object(s))
End Sub`

Changed: 2018-04-23 16:38, Category: ProgressBar, File: T6C232M1700.htm, ID: 1700