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

SplitPane with pane that isn't supposed to resize with parent should respect pref width / pref height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • fx2.1
    • fx2.1
    • javafx

      We recently added "resizableWithParent". Yet, in the following case, when the scroll pane first comes up it equally distributes the width among both children in the split pane.

             <SplitPane>
                  <ScrollPane prefWidth="250" id="left-pane">
                      <SplitPane.resizableWithParent>false</SplitPane.resizableWithParent>
                  </ScrollPane>
                  <ScrollPane></ScrollPane>
              </SplitPane>

      So the idea here is that I have one side which is not supposed to resize with the parent, and the right size is. Now I want to have the left size assume its preferred size. However this doesn't work, both ScrollPanes get 1/2 of the available space, I have to do a setDividersPosition call. I don't think I can do that in FXML without resorting to scripting.

            kwwong Kinsley Wong (Inactive)
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: