-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello
I have a problem with the height of the borderlayout, it's always 0px when it's used an include.
Example:
Here is the page that calls the include.
<zk>
<window border="normal" apply="pkg$.TestComposer" width="100%" height="100%">
<label value="You are seeing index.zul content." />
<include src="borderlayout.zul"/>
</window>
</zk>
Here is the borderlayout.zul
<window border="none" apply="org.zkoss.bind.BindComposer" width="100%" height="100%">
<borderlayout vflex="1" hflex="1">
<center autoscroll="true">
<div>
<label value="You are seeing borderlayout.zul content." />
</div>
</center>
</borderlayout>
</window>
With this code the height of the bordelayout it's always 0px. It doesn't work having the borderlayout with vflex="1" or height="100%".
I already asked this on:
forum.zkoss.org/question/94443/borderlayout-in-include-not-display-with-height100/
But there wasn't any answer to the problem.
This example is also on fiddle:
zkfiddle.org/sample/3hjfdcj/2-Borderlayout-height-and-width-problem#source-1
I don't know why you put a window in the included code.
The only thing you do there is declare the viewmodel.
You can do that also in the borderlayout.
If you can't remove it, try setting vflex and hflex of the window also to 1.
With your fiddle it's easy to resolve.
Here is the solution in a fiddle.
I put the hflex
en vflex
also to th einclude element.
Greetz chill.
Asked: 2015-05-26 18:39:59 +0800
Seen: 24 times
Last updated: May 27 '15
I tried what chillworld sugested but it didn't work.
eclipse1 ( 2015-05-27 13:19:50 +0800 )editTry wrap the label and include with vlayout and set h/vflex="1" to the include itself. See http://zkfiddle.org/sample/3hjfdcj/5-Borderlayout-height-and-width-problem
vincentjian ( 2015-05-29 08:05:40 +0800 )edit