Try using "FILL" for the "horizontalScrollBarPolicy".  If you read the
Javadoc for NEVER it says:   Never show the scroll bar, and don't affect
the layout of the pane's content.

Since you do want the layout to be affected, then FILL should work.

 

HTH,

~Roger Whitcomb

 

From: Andrey Popchansky [mailto:[email protected]] 
Sent: Friday, June 28, 2013 7:32 AM
To: [email protected]
Subject: FlowPane inside ScrollPane - how to force wrapping and vertical
scrolling?

 

I want to make contents of a FlowPane to scroll vertically, but not
horizontally (if another child doesn't fit in width, go to next row).
The obvious one doesn't work - it simply disables scrollbar, but no
wrapping is done, elements get clipped on the right side:

<Window bxml:id="window" maximized="true"
    xmlns:bxml="http://pivot.apache.org/bxml";
xmlns="org.apache.pivot.wtk">
 
    <ScrollPane>
        <horizontalScrollBarPolicy> NEVER </horizontalScrollBarPolicy>
        <FlowPane>
 
<!--        Lots of components here...  -->
 
        </FlowPane>
    </ScrollPane>
 
</Window>

What is the simplest way to do this?

Reply via email to