reverendlinux wrote:
>So why is flex="1" needed in both elements?
>
>
The default size of a <browser>, <vbox> or <hbox> is 0x0. So you need to
do something to get them to take up space in the window. In your case of
a <browser> inside a <vbox>, you need to make the <vbox> take up space
in the window, which then gives you the chance to make the <browser>
take up space in the <vbox>.
Now for horizontal space you don't actually need to do anything as both
<window> and <vbox> will by default stretch their children to their own
width, so the <browser> is already the correct width. (You can if
necessary modify this using the align attribute.) However, you still
need to do something about the height of the browser. The flex="1" on
the browser will make it consume all the "spare" height of the <vbox>,
but that assumes that it has some to spare. To achieve this, you also
need to add flex="1" to the <vbox>, so that it will consume all the
spare height of the window.