Hello Randy,
A layout manager divides available space of the container among its
children.
The size of the container must somehow be set for a layout manager to work:
either you set a size to it by calling resize() (or applying CSS styles),
or the size of the container is managed by a layout manager of its parent.
If you don't set a size on the container, the preferred size of the
children will determine the size of the containers, which will pretty much
behave as if there was no layout manager on the container.
BR,
Wim.
2013/12/9 Randy Yates <[email protected]>
> Hello,
>
> I'm trying to work with layout managers and I can't seem to resolve a
> very fundamental question. If I have a container (WContainerWidget) that
> has an associated layout (e.g., a WHBoxLayout), what sets the size: the
> layout or the container?
>
> The answer must be the container, because I can't find a resize or other
> sizing method along the class inheritance lineage of WHBoxLayout. Maybe
> I missed it.
>
> However, I then come to my next problem: I'd like to set my
> "sub" containers (conceptually, horizontal boxes inside the top-level
> container's vertical box) to a specific height; for example
>
> subContainer->resize(Wt::WLength::Auto, Wt::WLength("800pt"));
>
> But that doesn't work - the container just seems to retain a "natural"
> size based on its internal widgets.
>
> Can someone please shed some light?
> --
> Randy Yates
> Digital Signal Labs
> http://www.digitalsignallabs.com
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest