HBox does not correctly calculate it's prefHeight when it contains a multi-line Label

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • fx2.1
    • Affects Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      JavaFX2.0 JDK7u2b8

      Steps to reproduce:

      1. Create a HBox inside a VBox.
      2. Place a small circle and a taller multi-line label in the HBox.
      3. The HBox's prefHeight will be set to the height of the small circle, rather than the taller multi-line label.

      My reading of the HBox documentation (in this case) is that the HBox's parent should resize the HBox during layout to the top/bottom insets plus the largest of the children's pref heights.

      As a workaround, you can bind the multi-line label's prefWidth to a calculated value, then the HBox will resize it's prefHeight correctly.

            Assignee:
            Kinsley Wong (Inactive)
            Reporter:
            John Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: