-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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>
Asked: 2013-04-08 19:18:08 +0800
Seen: 16 times
Last updated: Apr 08 '13
composite component help [closed]
EL in a forEach @command not working?
Different template for each grid row
Cardlayout animation is broken
Grid RowRender slow using 6.5.1 and sizable=true
setVisible(false), component will load or not
Decimalbox and doublebox value rounded on iPad
history management with page status