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

ScrollPane doesn't take content size into account on USE_COMPUTED_SIZE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.1, 7u6, 8
    • Fix Version/s: emb-8u6, 8u20
    • Component/s: javafx
    • Environment:

      javafx-sdk2.2.0-beta-b06, JavaFX 8 b118

      Description

      When I have some content in my ScrollPane and do the following:

      scrollPane.setPrefWidth(ScrollPane.USE_COMPUTED_SIZE);

      I can assume that the content size will be used to set the scrollPane width.

      However it doesn't work that way. Look at the attached code. It has two scrollPanes with identical content. First scrollPane has prefWidth set to USE_COMPUTED_SIZE, second has it set to 300. See the resulting screenshot.

        Attachments

        1. Bug.java
          3 kB
        2. RT-21495.patch
          1 kB
        3. screenshot-1.jpg
          screenshot-1.jpg
          14 kB

          Issue Links

            Activity

              People

              Assignee:
              dgrieve David Grieve
              Reporter:
              mrkam Alexander Kuznetcov (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: