-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I am sure that this is something I do wrong, but I have BIG trouble getting components to behave in layouts (especially borderlayout). Furthermore, I have trouble when re-sizeing the browser and the componets are positioned in a borderlayout. No scrollbar appears and the lower part of the content disappears.
My applications are far to big to post here, so I thought I'd try and create the most simple example I could think of:
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<window border="none">
<borderlayout>
<center border="none">
<listbox height="800px">
<listitem>
<listcell>Howdy</listcell>
</listitem>
</listbox>
</center>
</borderlayout>
</window>
</zk>
A very simple page that contains a listbox with a fixed size inside the center of a borderlayout. When tested in Firefox 2 and maximized window it works, but if I resize the window the lisbox totally disappears.
Removing the borderlayout and just having the listbox in the window works like a charm. How can I get the borderlayout to behave as I think it is supposed to behave?
My apps is far more complex than this, but since I can't even get this to work, I think it is a good place to start.
Thanks for enlightning me!
Finest regards,
Rico
I am having this same problem and I don't see the solutions proposed here working. When I try the following test, the bottom of the center region is clipped off by the footer and there is no scroll bar:
<?page title="new page title" contentType="text/html;charset=UTF-8"?> <zk> <window width="100%" height="100%" border="none"> <borderlayout> <center border="none"> <listbox height="800px"> <listitem> <listcell>Howdy</listcell> </listitem> </listbox> </center> <south> <label value="footer"/> </south> </borderlayout> </window> </zk>
If this is normal borderlayout behavior and there is no work-around then this component has very limited use.
Please refer to javadoc of center, try to find keyword scroll,
and you'll find in LayoutRegion
http://www.zkoss.org/javadoc/3.5.2/zkex/org/zkoss/zkex/zul/LayoutRegion.html
boolean isAutoscroll()
Returns whether enable overflow scrolling.
boolean isCollapsible()
Returns whether set the initial display to collapse.
default is false.
Peter,
I missed your comment here from last week so this reply is coming a little late.
1) I was looking in the Developer's Reference pages 96-98 for properties of the center component and didn't see anything about autoscroll or collapsible. Are we supposed to use the JavaDocs to to get documentation for ZUML components?
2) Setting autoscroll on the west, center and east adds a scrollbar to each region, not to the whole page so the user has to scroll each region separately! That's just not user-friendly.
3) I don't want the regions to collapse, so collapsible=false is fine as a default for me.
4) I want the layout to stay just the way it is laid out but to have a scroll bar for the whole layout area when the window is too small to contain it. That seems like the natural, least-surprising behavior.
Thanks,
Scott
To sreed,
Thanks for your reply.
1)There is room to improve ZK documentations, and we're trying to enhance it. Therefore, we have wiki now. Due to ZK's fast development, the document may not be already sync to latest status. And java doc generated by source code is usually most up to date. We're also thinking about how to integrate javadoc and ZK developer reference.
As to 2),3),4) Please post it to feature request and we'll track it. Your feedback makes ZK more perfect. Thank you.
Asked: 2009-02-18 12:32:59 +0800
Seen: 457 times
Last updated: Mar 15 '09