First time here? Check out the FAQ!
Hello :-)
I'm getting crazy with this effect:
I create a popup window with an inlying borderlayout in the doAfterCompose. There ist no ZUL-file, just the Composer to create the components. Problem: All components are created correctly, but initially the borderlayout has no height, the window opens apparently empty. If you resize the window (just pull a little bit by the frame), the content appeares. Why does this happen?
Here ist the code (without the data filling parts):
@Override
public void doAfterCompose(final Window win) throws Exception {
super.doAfterCompose(win);
win.setHeight("600px");
win.setWidth("800px");
...
final Borderlayout bl = new Borderlayout();
bl.setHflex("1");
bl.setVflex("max");
bl.setParent(win);
final North north = new North();
north.setParent(bl);
north.setHflex("1");
north.setVflex("min");
final Component toolbar = createToolbar();
toolbar.setParent(north);
final Center center = new Center();
center.setParent(bl);
center.setHflex("1");
center.setVflex("1");
center.setAutoscroll(true);
(here comes content for center...)
final South south = new South();
south.setParent(bl);
south.setHflex("1");
south.setVflex("min");
final Div btnDiv = new Div();
btnDiv.setParent(south);
(here come some buttons...)
btnEsc.setParent(btnDiv);
btnSave.setParent(btnDiv);
}
Asked: 2021-01-21 18:39:18 +0800
Seen: 2 times
Last updated: Jan 21
which version are you using? for faster verification you can provide a runnable example on https://zkfiddle.org
cor3000 ( 2021-01-22 10:49:10 +0800 )editI created a runnable version here: https://zkfiddle.org/sample/19gv39v/1-Borderlayout-initially-has-no-height
to me it works with 9.5.0.2/8.6.4.1 didn't try any older versions, maybe you can provide the missing information to reproduce this
cor3000 ( 2021-01-22 15:07:04 +0800 )editHello #cor3000,
thank you very much for your fast response and your example (we also use ZK 9.5.0.2).
We finally solved it by giving the center area an additional Vlayout and triggering the Borderlayout content event-based. Now it works :-)
assonaZkDev004 ( 2021-01-25 15:52:49 +0800 )edit