-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3560478
By: nobody
Greetings,
Am coding up a grid object and adding rows. However, newly added rows do not have the same width as the column headers. How do I set it up so that the field width of each row is the same width as each column header?
Example Code:
<window title="Test Grid">
<grid id="grid" width="500px" height="100px">
<columns>
<column label="und" align="center"/>
<column label="stk" align="center"/>
<column label="exp" align="center"/>
</columns>
<rows>
<row></row>
</rows>
</grid>
<button label="Add row" onClick="addRow()"/>
<zscript>
void addRow() {
Row r = new Row();
new Label("A31").setParent(r);
new Label("A32").setParent(r);
new Label("A33").setParent(r);
grid.getRows().appendChild(r);
}
</zscript>
</window>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3562054
By: henrichen
Hi,
It works ok in IE. Are you using Firefox? It looks like a bug in Grid component implementation when browsing with Firefox. Can you file a bug in bug tracking?
Thanks.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3616233
By: nobody
I am seeing the same behavior. Yes using Mozilla Firefox 1.5.0.1
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3617139
By: tomyeh
The header of grid is calculated based on the first row. In your case, the first row is empty, so ZK client has no idea about the width of each client.
It can be fixed simply by romving <row></row> as follow.
<window title="Test Grid">
<grid id="grid" width="500px" height="100px"> <columns> <column label="und" align="center"/> <column label="stk" align="center"/> <column label="exp" align="center"/> </columns> <rows> </rows> </grid> <button label="Add row" onClick="addRow()"/> <zscript> void addRow() { Row r = new Row(); new Label("A31").setParent(r); new Label("A32").setParent(r); new Label("A33").setParent(r); grid.getRows().appendChild(r); } </zscript> </window>
Jim has posted to Bugs. I'll find a way to fix this issue.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3617961
By: jim_bo_lisa
I downloaded the nightly build and I am seeing now that all the row columns are misaligned in Firefox. Before only one or two were slightly out of alignment.
Here is my Zul code.
<grid height="200px">
<columns>
<column label="Condition" />
<column label="Component" />
<column label="Attribute" />
<column label="Keyword" />
<column label="Edit" />
</columns>
<rows id="_queryBuilderRows" />
</grid>
I then programatically get the id for the rows control, then create a Row and
appenChild() labels to the Row, then finally do a rows.appendChild(myNewRow) using this newly created Row child.
Hope that helps.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3620519
By: jim_bo_lisa
Should I submit this as a bug?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3620557
By: tomyeh
Is it http://sourceforge.net/tracker/index.php?func=detail&aid=1444981&group_id=
152762&atid=785191?
See also
http://sourceforge.net/tracker/index.php?func=detail&aid=1431351&group_id=152762
&atid=785191
http://sourceforge.net/tracker/index.php?func=detail&aid=1436657&group_id=152762
&atid=785191
In short, misalignment happens if header's text is too long or short comparing to the body's text. And, this is basically browser's limitation. Specifying width explicitly to resolve this case.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697529
By: nobody
How can I change header data in zul file, because it's automatically generated?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697575
By: henrichen
When you say header, do you mean the contents between <head> ... </head> in the generated HTML? Why do you need to change it?
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697721
By: nobody
I want to change charset in meta tags
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697734
By: henrichen
There are only one way then. You have to write zhtml page(default your namespace to xhtml) and use zul namespace as exception. It is a little bit tedious if you use a lot zul components but works ok.
Or maybe you want to post a Feature Request so we can track it.
/henri
Asked: 2006-02-06 16:22:46 +0800
Seen: 1,025 times
Last updated: Apr 22 '06