pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: A split pane inside any other pane seems not to work?
Date Mon, 07 Mar 2011 17:20:32 GMT
No, BoxPane just isn't designed to work that way. BoxPane lays components out in a horizontal
or vertical row. A horizontal box pane will optionally size its children to fill the vertical
space, but it doesn't impose any constraints in the horizontal direction. Vertical box panes
behave similarly.

On Mar 7, 2011, at 11:12 AM, Daniel Ziltener wrote:

> Ok, I'll try that. Is that a bug in BoxPane that this doesn't work correctly?
> 
> 2011/3/7 Greg Brown <gk_brown@verizon.net>
> Correct. You probably don't want to put the SplitPane in a hierarchy where you have a
BoxPane as an ancestor. I'd recommend using a TablePane instead of a BoxPane in this case.
> 
> On Mar 7, 2011, at 10:32 AM, Daniel Ziltener wrote:
> 
>> Actually, I can wrap the SplitPane with whatever I want, as long as there is a BoxPane
involved in layouting it doesn't work.
>> Right now I have the following hierarchy up to the problematic SplitPane:
>> Window -> Border -> FlowPane -> BoxPane -> StackPane -> SplitPane.
And the SplitPane apparently gets a height of 0 as long as neither the SplitPane nor any of
the contained components get an explicit preferredWidth.
>> 
>> 2011/3/7 Greg Brown <gk_brown@verizon.net>
>> > Apparently such a container is non-existent and preferredWidth and preferredHeight
has to be used.
>> 
>> What makes you think that? There are plenty of containers that you could use for
this:
>> 
>> Border
>> GridPane
>> StackPane
>> TablePane
>> TabPane
>> Window
>> 
>> You have to set an explicit preferred size *somewhere*, but that is generally done
at the top level on Window, either via the "maximized" flag or via the pref. size properties.
>> 
>> > I think I'll just have to listen to width and height changes and then set the
preferred sizes manually.
>> 
>> You can do that, but as I said, it's really not the "right" way to do it.
>> 
>> 
> 
> 


Mime
View raw message