0

Borderlayout not visible

asked 2008-08-12 18:33:22 +0800

dastultz gravatar image dastultz
797 9

Hello, I'm using Zk 3.0.7 with Firefox on a Mac. The following code produces an invisible borderlayout. Swap the comments as noted and it works:

Window win = new Window();
win.setBorder("normal");
win.setPage(page);
win.appendChild(new Label("Window"));

Borderlayout layout = new Borderlayout();
layout.setWidth("100%");
layout.setHeight("100%");
win.appendChild(layout);
East east = new East();
layout.appendChild(east);
east.appendChild(new Label("The East"));
Center center = new Center();
layout.appendChild(center);

//center.appendChild(new Label("The Center"));
// switch below block with above line and it works
Hbox hbox = new Hbox();
hbox.appendChild(new Label("Center in Hbox"));
center.appendChild(hbox);

West west = new West();
layout.appendChild(west);
west.appendChild(new Label("The West"));

Even this doesn't work ("Window" label is visible but borderlayout isn't):

<window border="normal">
<label>Window</label>
<borderlayout width="100%" height="100%">
<east>The East</east>
<center>The Center</center>
<west>The West</west>
</borderlayout>
</window>

Any ideas?

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2008-08-12 18:59:46 +0800

dastultz gravatar image dastultz
797 9

Well, now I've reduced it to just the window and my content like so:

Window win = new Window();
win.setBorder("normal");
win.setContentStyle("overflow: auto");
win.setWidth("800px");
parent.appendChild(win);
win.appendChild(contentContainer);

Not bad, but any comments on the borderlayout visibility issue would be appreciated. Also would like to know how to tell the window to scroll to the right when new content is added to contentContainer (which is an Hbox).

Thanks.

link publish delete flag offensive edit

answered 2008-08-12 18:46:01 +0800

dastultz gravatar image dastultz
797 9

Ok, I've got it working now by specifying the height and width for both the border layout AND the window. It seems I can't make it work without the window (by adding the borderlayout to a vbox, for example). The border layout extends past the bottom of the window, though. Anyway, all I want is an autoscroll region of some kind. I have an hbox that I keep adding stuff to, and when it fills up the screen I want a scroll bar to pop up (for the hbox, not the browser window). Is there a better way to do this?

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: 2008-08-12 18:33:22 +0800

Seen: 281 times

Last updated: Aug 12 '08

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