0

Groupbox issue with height on close

asked 2020-02-12 21:23:06 +0800

Ignis11 gravatar image Ignis11
11 1

I used groupbox on ZK 8.6.4. on Chrome browser when Open the groupbox the screen increase the height to show the data inside the groupbox, pushing the rest of the components to the bottom of the screen, even if scrollbar appears to show all of them. But when I closed the same groupbox, it closed well hidding data, but the space increased before remains, keeping the rest of the component bottom of the screen, even out of screen if scrollbar appeared.

Is it the regular behaviour of the groupbox? Are there any chance to force to decrease the height of the component/container when groupbox close it?

Thanks

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-02-13 14:38:59 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2020-02-17 10:37:22 +0800

I suppose you specify vflex="min" on the groupbox.

the reason is: client render-on-demand In the beginning, the groupbox is closed. zk doesn't create the groupbox's content into DOM. When you open the groupbox, zk creates its content DOM, so the content occupies space now. Even you close it again, ZK doesn't remove the content DOM, so the groupbox height doesn't reduce back.

possible solutions:

  • remove vflex="min"

Please see here

  • disable client render-on-demand <custom-attributes org.zkoss.zul.client.rod="false"/> so that the groupbox occupies larger space at first even it's closed. That makes the page layout unchanged between open and close.

  • remove the content when closing use <if> to remove the content when you close the groupbox, and call Clients.resize(groupbox) to reduce the height.

If the above suggestions don't solve your problems, please post your zul.

link publish delete flag offensive edit
0

answered 2020-02-24 16:43:15 +0800

Ignis11 gravatar image Ignis11
11 1

vflex was the solution. Thanks for your fast response!!

link publish delete flag offensive edit
Your answer
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: 2020-02-12 21:23:06 +0800

Seen: 13 times

Last updated: Feb 24 '20

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