answered
2018-09-28 01:18:32 +0800
BrotherRichard 10 ● 1 I am not sure that I understand your comment. Are you saying that when you use zkfiddle (which I know nothing about) it behaves as I say it does (does not fill the browser window) or that it behaves as I say it should (does fill the browser window)?
What it does on my system is not fill the browser window. Specifically, it renders as it if has a height of "0px". No content shows at all, just a horizontal line 8 to 12 px high (that I presume is the borders because it is in the border color).
The online documentation (https://www.zkoss.org/wiki/ZK%20Component%20Reference/Layouts/Borderlayout) says that you have to set the height when you put a Borderlayout into a container. That is absolutely NOT what you should have to do, at least not if their Borderlayout is meant to behave like the one in Java Swing (and other similar development environments).
The documentation also says "The default height of Borderlayout is dependent on its parent component, therefore, users can also put Borderlayout in a container with a fixed height." - The problem with that is that you should NOT HAVE TO give the container a fixed height. You SHOULD be able to have the container (or the Borderlayout itself) expand (vflex="1") to fill it's parent (the browser window in this case).
I do not have any JS or CSS that might affect the result. I have tried to use CSS to "fix" it, but you can't use percents in heights without creating others overflow problems (because their size calculations don't take padding or something into account). That is why I am asking here.
I just need the Borderlayout (or some container that it's in) to fill the browser window (and resize as things change). Certainly someone else has wanted to do the same thing. That's one of the main uses of a Borderlayout: To organize the main screen.