Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8118919

Slider ticks and labels not visible when explicitly set through CSS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 8
    • 8
    • javafx

      Slider ticks and labels not visible when explicitly set through CSS.
      Use the following application to reproduce the issue:

      import com.sun.javafx.runtime.VersionInfo;
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Slider;
      import javafx.scene.control.SliderBuilder;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class Main extends Application {

          public static final String style = "-fx-show-tick-labels: true;"
                          + "-fx-show-tick-marks: true;";
          @Override
          public void start(Stage primaryStage) {
              final Slider slider = SliderBuilder.create().min(0).max(100).value(20).focusTraversable(false).build();

              VBox root = new VBox();
              root.setSpacing(10);
              root.getChildren().addAll(slider);
              
              Scene scene = new Scene(root, 300, 250);
              
              primaryStage.setTitle(VersionInfo.getRuntimeVersion());
              primaryStage.setScene(scene);
              primaryStage.show();
          }
      }

      Discovered on Win7, hardware rendering, b101/b102.

            psomashe Parvathi Somashekar (Inactive)
            ilatyshe Irina Grineva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: