-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Using GenericiRichlet (java programing not zul scripting) I have a situation where I have a Grid with a custom model and custom renderer. The custom renderer builds each cell for each row. I need to force each row to be exactly "15px" in height. In some cases data within a cell will be partially obscured because the height does not allow full display. A tooltiptext will show the entire data on mouse over.
I have tried cell.setHeight and Row.setHeight but that has not worked.
thank you for your assistance.
Here is an example.... using ZK fiddle http://zkfiddle.org/sample/576mri/1-Monthly-Time-sheet-of-Balance-with-Grid after line 7 add
row.setHeight("50px")
You will see that the rows are all 50px in height. Without setHeight they were all about 33px.
Now change that line to
row.setHeight("20px")
They still come out about 33px.
Can someone tell me what the process is for ZK to determine a rows final height?
You need to modify the css. Try this code:
. . . <grid id="monthlySheet" width="600px" sclass="GridPlain"> <columns> <column width="80px" >Year</column> <column width="80px" >Month</column> <column width="80px" >Date</column> <column width="80px" >Weekday</column> <column width="80px" >In</column> <column width="80px" >Out</column> <column width="80px" >Balance</column> </columns> </grid> <style> .GridPlain tr.z-row td.z-row-inner,.GridPlain tr.z-row .z-cell,div.z-grid.GridPlain,.GridPlain tr.z-grid-odd td.z-row-inner,.GridPlain tr.z-grid-odd .z-cell,.GridPlain tr.z-grid-odd,.GridPlain tr.z-row-over>td.z-row-inner { border: none; zoom: 1; background: white none repeat scroll 0 0; border-top: none; border-top-style: none; border-top-width: 0px; padding-top: 0px; padding-left: 3px; padding-right: 3px; padding-bottom: 0px; border-left: none; border-right: none; border-bottom: none; border-bottom-style: none; border-bottom-width: 0px; } </style> . . .
best
Stephan
Stephan,
thank you for the help.
The code you provided did not seem to work. I am not a CSS expert by any means but I don't see where you are setting the row height. And the .GridPlan class definition does not seem to be well formed. There seems to be a stray left bracket
Can you double check it and ensure their was not a pasting error.
thank you
I was able to solve this:
The key is to set the zClass to some non-existant class so that you don't suffer any of the default css.
component.setZclass("Non_Existant_Class");
This must be done at many levels. For example in the grid I had to do so for the cell, and the row, and the header.
Thanks for the information.
Asked: 2012-10-09 21:00:41 +0800
Seen: 167 times
Last updated: Nov 07 '12