[ToolTip] Tooltip not showing text when wrapText enabled

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • 8u20
    • Affects Version/s: 8
    • Component/s: javafx

      Run this sample

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.Tooltip;
      import javafx.scene.layout.HBox;
      import javafx.stage.Stage;

      public class HelloTooltip extends Application {
        
          public static void main(String[] args) {
              Application.launch(args);
          }

          @Override public void start(Stage stage) {
              Label label = new Label("Test");
              Tooltip tooltip = new Tooltip("1");
              tooltip.setWrapText(true);

              label.setTooltip(tooltip);

              HBox box = new HBox(label);
              Scene scene = new Scene(box);
              stage.setScene(scene);
              stage.show();
          }
      }

      Let your mouse on the Tooltip, you will see that the number one is not showing. If you deactivate the wrapText or you enter more that one character in the Tooltip, the problem is gone.

      Any idea?

      Work around right now is not to wrap the text when only one character is present.

            Assignee:
            Jonathan Giles
            Reporter:
            Samir Hadzic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: