0

borderlayout height="100%" failed on Opera and IE with ZK5

asked 2010-01-21 09:59:34 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

I'm not sure if this is a browser or zk issue, so I'm posting here first.

With borderlayout as root component, defining the height="100%" works on FF and GC, but in Opera10 and IE8 doesn't. Changing to px works, but as root component it's best to work with 100%.

Just copied the zk demo of border layout and changed the height="450px" to height="100%". (on zk demo won't work because the component is embedded inside a window, so I copied to my project and tested with borderlayout being the root component)

Tested with ZK5 FL 21/01/2010.

Kind regards,
Madruga

delete flag offensive retag edit

16 Replies

Sort by ยป oldest newest

answered 2010-01-24 22:46:06 +0800

iantsai gravatar image iantsai
2755 1

Why not give a Window outside Borderlayout with percentage width and height?

link publish delete flag offensive edit

answered 2010-01-25 04:16:35 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Hi,

I'm actually with this layout: Window width="100%" and height ="100%", and still Opera and IE just has a div with "0px" of height. Searching on the forum I saw that if borderlayout component was the root it might work it out, but still, no good.

link publish delete flag offensive edit

answered 2010-01-26 01:29:00 +0800

iantsai gravatar image iantsai
2755 1

updated 2010-01-26 01:29:29 +0800

You mean even you give a Window as a root in page, the layout height still be 0?
I have test this case in IE8 over Win7, it works fine.

<?page title="Auto Generated index.zul"?>
<window title="Hello World!!" border="normal" width="100%" height="100%">
<borderlayout >
	<north title="North" maxsize="300" size="50%" splittable="true" collapsible="true">
		<borderlayout>
			<west title="West" size="25%" flex="true" maxsize="250" splittable="true" collapsible="true">
				<div style="background:#B8D335">
					<label value="25%"
						style="color:white;font-size:50px" />
				</div>
			</west>
			<center border="none" flex="true">
				<div style="background:#E6D92C">
					<label value="25%"
						style="color:white;font-size:50px" />
				</div>
			</center>
			<east size="50%" border="none" flex="true">
				<label value="Here is a non-border"
					style="color:gray;font-size:30px" />
			</east>
		</borderlayout>
	</north>
	<center border="0">
		<borderlayout>
			<west maxsize="600" size="30%" flex="true" border="0" splittable="true">
				<div style="background:#E6D92C">
					<label value="30%"
						style="color:white;font-size:50px" />
				</div>
			</west>
			<center>
				<label value="Here is a border"
					style="color:gray;font-size:30px" />
			</center>
			<east title="East" size="30%" flex="true" collapsible="true">
				<div style="background:#B8D335">
					<label value="30%"
						style="color:white;font-size:50px" />
				</div>
			</east>
		</borderlayout>
	</center>
</borderlayout>
			
</window>

link publish delete flag offensive edit

answered 2010-06-18 10:07:24 +0800

norbert45fr gravatar image norbert45fr
18

I have a similar problem with zkstudio under eclipse.

<window title="Hello World!!" border="normal" width="100%" height="100%">
<borderlayout >

nothing is rendered in visual editor tab

<borderlayout width="100%" height="100%">
same here

<borderlayout height="800px">
works

link publish delete flag offensive edit

answered 2010-06-18 13:28:48 +0800

vinhvo gravatar image vinhvo
369 3

Bugs tracker:
1st
2nd

--> Check it out.

link publish delete flag offensive edit

answered 2011-02-02 09:12:59 +0800

giordan gravatar image giordan
48 2

Hi everyone!

I'm using ZK 5.0.5.
I have a borderlayout inside a window, that has the height and width properties setted with the value "100%".
The border of the window is correctly displayed and it's enough big to contain the borderlayout as desired.
If I try to set the height property of the borderlayout with a percentage value, the borderlayout isn't displayed.
I've already tried to follow the suggestions of without luck.
How I can set the dimensions of the borderlayout so that it fill the window, always with any resolution of the screen?

Thanks a lot, best regards,

Giordano

link publish delete flag offensive edit

answered 2011-02-02 10:52:32 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

It's a old thread, so I actually don't remember the solution, but here's a few things to try:

1. Don't set width neither heigth on the border layout
2. Dismiss the window and use the borderlayout as a root component with width="100%" and heigth="100%"
3. Inform hflex="1" and vfle="1" on the borderlayout
4. Add a vbox (or vlayout) on top of the borderlayout and play with align and pack attributes, or something like that (se the trackers link posted by vinhvo)

HTH,
Madruga

link publish delete flag offensive edit

answered 2011-02-03 01:51:34 +0800

giordan gravatar image giordan
48 2

Thanks a lot Madruga!

I'm sad: the second suggestion is a little invasive for my architecture, but will try it, hoping that it works.
None of the other suggestions work.

In any case, I think that it might be the case to modify the BorderLayout component to improve its control.
What do you think about it?

Thanks again, best regards

Girodano

link publish delete flag offensive edit

answered 2011-02-03 02:58:56 +0800

giordan gravatar image giordan
48 2

I confirm that the solution to dismiss the window is impractical in my architecture: we follow the MVC paradigm where each zul file has a window as main container and that exploits "wire variables" and "auto forward".

Please, somebody help me solve the problem of proportional sizing of BorderLayout.

Thanks a lot in advance, best regards,

Giordano

link publish delete flag offensive edit

answered 2011-02-03 06:16:16 +0800

archana gravatar image archana
102

Source Code

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-01-21 09:59:34 +0800

Seen: 2,154 times

Last updated: Jul 26 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More