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

[Tooltip] width and height cannot be set or broken after first usage.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u60
    • 7u6
    • javafx
    • 2.2.0b19

      Application:

          @Override
          public void start(Stage stage) throws Exception {
              VBox vb = new VBox();

              Tooltip tp = new Tooltip();
              tp.setText("text");
              tp.setGraphic(new Rectangle(0, 0, 10, 10));

              Button b = new Button("with tooltip");

              b.setTooltip(tp);

              Slider slider1 = new Slider(0, 100, 50);
              slider1.setShowTickLabels(true);
              slider1.setShowTickMarks(true);

              Slider slider2 = new Slider(0, 100, 50);
              slider2.setShowTickLabels(true);
              slider2.setShowTickMarks(true);

              Slider slider3 = new Slider(0, 100, 50);
              slider3.setShowTickLabels(true);
              slider3.setShowTickMarks(true);

              slider1.valueProperty().bindBidirectional(tp.minWidthProperty());
              slider2.valueProperty().bindBidirectional(tp.prefWidthProperty());
              slider3.valueProperty().bindBidirectional(tp.maxWidthProperty());

              vb.getChildren().addAll(b, new Label("Min width"), slider1, new Label("Pref width"), slider2, new Label("Max width"), slider3);

              Scene scene = new Scene(vb, 300, 300);
              stage.setScene(scene);
              stage.show();
          }

      When I set max Width to 100, min width to 0, and start to change pref width to different values, it doesn't affect.

      Actually, it looks like, only first change affects. For instance, if I set pref width to some value, it affects, and after that, affecting of any of this 3 properties disappear.

            jgiles Jonathan Giles
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: