I'm using a progress bar control and would like it to reflect the percentage provided. How can I go about doing that? Also perhaps could be some functionality to change its background color not to be the default blue?
I'm using a progress bar control and would like it to reflect the percentage provided. How can I go about doing that? Also perhaps could be some functionality to change its background color not to be the default blue?
Addition to Post #4 - CustomView ProgressBarIndicator
Scribbled the solution shared Post #4 further to a CustomView which could be used for a customized TableView as in Post #1.
Note: The ProgressBarIndicator Customview is rather simple i.e. beside setting the progress value 0 - 1 (shown in the label as 0 - 100%), there are two properties to set the progressbar and the label text color ... so open for enhancements.
Sub progress(value As Int)
If value < 25 Then
ProgressBar1.style="-fx-box-border: black; -fx-accent: green;"
else If value > 25 And value < 50 Then
ProgressBar1.style="-fx-box-border: black; -fx-accent: yellow;"
else if value > 50 And value < 75 Then
ProgressBar1.style="-fx-box-border: black; -fx-accent: orange;"
Else
ProgressBar1.style="-fx-box-border: black; -fx-accent: red;"
End If
ProgressBar1.Progress = value/100
End Sub