1

I'm using this cs code to set the color of a Progress Bar in JavaFX.

.progress-bar > .bar {
    -fx-accent: black;
    -fx-background-color: linear-gradient(
        from 0px .75em to .75em 0px,
        repeat,
        -fx-accent 0%,
        -fx-accent 49%,
        derive(-fx-accent, 30%) 50%,
        derive(-fx-accent, 30%) 99%
        );
}

I have a two questions: How I can add animation to this Progress Bar like Standard Windows animation:

enter image description here

Notice the white color into the Progress Bar. And Also I would like to make the Progress Bar little more thin. Can I control the size of the Progress Bar with CSS?

user1285928
  • 1,328
  • 29
  • 98
  • 147
  • possible duplicate of [JAVAFX: Is it possible to set css by code?](http://stackoverflow.com/questions/22817897/javafx-is-it-possible-to-set-css-by-code) – James_D May 04 '14 at 20:47

1 Answers1

4

All styling issues regarding the ProgressBar have already been answered in several places. You just have to do a little bit of research.

  • Simple example
  • Example with gradient
  • Extended example with code

    Would mark as duplicate, but I'm curious if anyone pitches in with the actual Windows 8 progress bar gradient.

  • Community
    • 1
    • 1
    Georgian
    • 8,795
    • 8
    • 46
    • 87