0

Set row height Grid in zk 7

asked 2016-02-22 05:14:14 +0800

onsir gravatar image onsir
132 2

hello dear,

i have code to set row height like this, in ZK 6

<?xml version="1.0" encoding="UTF-8"?>
 <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" root="./win1" ?>
 <?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
 <zk xmlns="http://www.zkoss.org/2005/zul"
 xmlns:h="http://www.w3.org/1999/xhtml"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.zkoss.org/2005/zul     http://www.zkoss.org/2005/zul/zul.xsd">

<style>
   <!--for height row in grid -->    
   .MyGridRowHeight
    tr.z-row td.z-row-inner{
         border:1px solid white;
         border-right:1px solid transparent;
         padding:0px;
    }
 </style>

<grid sclass="MyGridRowHeight" style="margin-bottom:5px;">
           <columns>
               <column width="90px"/><column/>
           </columns>
           <rows>
             <row >
                <div align="center">
                   <label style="font-weight:bold;"/>
                </div>
             </row>
             <row>
                <div align="right">
                   <label id="lblCode" value="Code"/>
                </div>
                <textbox id="code" />
             </row>
             <row> 
                <div align="right">
                   <label id="lblDes"  value="Description"/>
                </div>
                <textbox id="description" cols="60"/>
             </row>
            </rows>
        </grid>

but this code not worked in ZK 7, i used ZK 7.0.2. how to set row height in ZK 7? thanks

delete flag offensive retag edit

5 Answers

Sort by ยป oldest newest most voted
0

answered 2016-02-24 02:55:54 +0800

onsir gravatar image onsir
132 2

thanks, its work i use code from chill.

link publish delete flag offensive edit
0

answered 2016-02-23 12:59:51 +0800

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

updated 2016-02-23 13:00:11 +0800

Try this :

<style>
   <!--for height row in grid --> 
    .MyGridRowHeight
        tr.z-row td.z-row-inner div.z-row-content{
            border:1px solid white;
            border-right:1px solid transparent;
            padding:0px;
            margin:0px;
     }
</style>

Greetz chill.

link publish delete flag offensive edit
0

answered 2016-02-23 10:36:58 +0800

Darksu gravatar image Darksu
1991 1 4

Hello,

Using the following it should work:

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<grid vflex="1">
           <columns visible="false">
               <column width="90px"/><column/>
           </columns>
           <rows height="50px">
             <row height="100px">
                <div align="right">
                   <label id="lblCode" value="Code"/>
                </div>
                <textbox id="code" height="0px"/>
             </row>
             <row height="10px"> 
                <div align="right">
                   <label id="lblDes"  value="Description"/>
                </div>
                <textbox id="description" cols="60"/>
             </row>
        </rows>
     </grid>
</zk>

If it is not, then something else is interrupting with it (a css styling, a theme maybe?)

Let me know more details regarding your zul.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2016-02-23 08:52:59 +0800

onsir gravatar image onsir
132 2

hello Darksu,

i has try you link, but not successfully, image description

i changed code like this

<grid vflex="1">
           <columns visible="false">
               <column width="90px"/><column/>
           </columns>
           <rows height="0px">
             <row height="10px">
                <div align="right">
                   <label id="lblCode" value="Code"/>
                </div>
                <textbox id="code" height="0px"/>
             </row>
             <row height="10px"> 
                <div align="right">
                   <label id="lblDes"  value="Description"/>
                </div>
                <textbox id="description" cols="60"/>
             </row>
        </rows>
     </grid>

thanks

link publish delete flag offensive edit
0

answered 2016-02-22 09:08:01 +0800

Darksu gravatar image Darksu
1991 1 4

Hello onsir,

Please refer to the following fiddle:

http://zkfiddle.org/sample/3nk48qa/2-row-height-of-grid

Best Regards,

Darksu

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
1 follower

RSS

Stats

Asked: 2016-02-22 05:14:14 +0800

Seen: 110 times

Last updated: Feb 24 '16

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