0

Problem in vertical aligment on hlayout when setting vflex or height

asked 2014-02-20 15:17:25 +0800

andreasboos gravatar image andreasboos
105 3

updated 2014-02-21 08:18:55 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

Hi. I do not know if I'm misunderstanding the use of the vertical align property hlayout the component or if it is a bug. (http://books.zkoss.org/wiki/ZKComponentReference/Layouts/Hlayout).

I try the example from doc. site and that example don't work for me how expected. I have a hlayout when I use vflex or height to test. In this hlayout I want the childrens stay vertical alignment on the bottom. I set valign property and also sclass z-valign-bottom (just like doc.) and my components childrens stay align in top of hlayout.

This is my example:

<?xml version="1.0" encoding="UTF-8"?>
<window width="100%" height="100%">
    <vlayout vflex="true" hflex="true">
        <hlayout  style="background-color:#c0c0c0;">
            center: <textbox/>
        </hlayout>
        <hlayout sclass="z-valign-top"  style="background-color:#ededed;">
            top: <textbox/>
        </hlayout>
        <hlayout height="200px" sclass="z-valign-bottom"  
                 style="background-color:#c0c0c0;">
            bottom: <textbox/>
        </hlayout>
    </vlayout>
    <hlayout valign="bottom" sclass="z-valign-bottom" vflex="true" hflex="true" style="background-color:#ededed;">
        teste
    </hlayout>
</window>

My zk version is 7. But I tested in 6.5.3 too. Both EE version.

What is wrong?

Thank you.

delete flag offensive retag edit

Comments

The vertical align means the text is align to bottom of the textbox.

vincentjian ( 2014-02-21 10:17:39 +0800 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2014-02-21 10:42:11 +0800

MVarun gravatar image MVarun flag of India
268 1 6

Hi andreasboos,

Try this..

<vbox hflex="true" vflex="true" align="center" pack="end">
   .......
   ....
   ..
</vbox>

use <vbox> instead of <vlayout>

Also Refre this doc.. to understand align and pack.

Greetings..

M Varun.

link publish delete flag offensive edit
0

answered 2014-02-21 11:48:01 +0800

andreasboos gravatar image andreasboos
105 3

Hello Now I'm sure I misunderstood the question about alignment in hlayout. Thanks for the help vincentjian and mvarun.

link publish delete flag offensive edit

Comments

You are Welcome :)

MVarun ( 2014-02-22 09:35:43 +0800 )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: 2014-02-20 15:17:25 +0800

Seen: 32 times

Last updated: Feb 21 '14

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