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

ScrollPane doesn't take content size into account on USE_COMPUTED_SIZE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • emb-8u6, 8u20
    • fx2.1, 7u6, 8
    • javafx
    • javafx-sdk2.2.0-beta-b06, JavaFX 8 b118

      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.

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

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

              Created:
              Updated:
              Resolved:
              Imported: