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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: fx2.1
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              kwwong Kinsley Wong
              Reporter:
              rbair Richard Bair
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: