0

Text On Button Wraps in On Case - Not Anther - Why?

asked 2013-04-08 19:18:08 +0800

ansancle gravatar image ansancle
327 9

Issue - Text on Button Wraps to 2 lines in one case, not in the other. This is on an Ipad.

I have 2 pages that are basically identical. Both have grids on them that are dynamically created and in each row/column in the grid is a single button with a label.

Inside the zul files, one grid has no parent besides the window itself (see below). On this grid, the button text will wrap to 2 lines when it's too long to fit.

Inside the the other zul, the grid is a child of a groubbox, scrollview, and vlayout. The grid is identical as the other grid in every other way, only now the button text will not wrap to 2 lines. I removed the groupbox/scrollview/vlayout as parents and made the grid the child of the window like the first grid and then the text on the button wraps. Why? Is there any other way to control this? Since button has no direct methods or way of controlling wrapping text I am wondering why the parent effects this?

Code below :

Window 1 - wrapping :

<zk>
<?page title="Lighting Home"?>
<zscript>

...... </zscript>

<window border="none" id="_dhWindow" apply="com.dh.ui.ipad.view.lighting.DHzLightingHomeView" height="100%" width="100%"  xmlns:w="http://www.zkoss.org/2005/zk/client">

<dhLightingHomeScreenAreaGrid id="_lightingAreaGrid">
    <columns>
    <column width="100%" align="left"/>
    </columns>  
</dhLightingHomeScreenAreaGrid>     
<timer id="_timer" delay="500" repeats="true" />                
</window>
</zk>

And the second grid where the text on the button does NOT wrap - it's inside the parent components other than the window.

    <zk>
    <?page title="Lighting Home"?>
    <zscript>   
......
    </zscript>

    <window border="none" id="_dhWindow" apply="com.dh.ui.ipad.view.lighting.DHzLightingHomeView" height="100%" width="100%"  xmlns:w="http://www.zkoss.org/2005/zk/client">

<vlayout>
 <scrollview vflex="1" hflex="1">
        <groupbox height="${mainLocationsGridHeight}" width="100%" closable="false">        
            <dhSecurityHomeLocationsGrid id="_securityHomeLocationsGrid" width="100%" height="${mainLocationsGridHeight}">
                <columns></columns>
            </dhSecurityHomeLocationsGrid>                   
        </groupbox>
    </scrollview>
</vlayout>  
    <timer id="_timer" delay="500" repeats="true" />                
    </window>
    </zk>
delete flag offensive retag edit
Be the first one to answer this question!
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
1 follower

RSS

Stats

Asked: 2013-04-08 19:18:08 +0800

Seen: 16 times

Last updated: Apr 08 '13

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