It seems related to this known bug: http://tracker.zkoss.org/browse/ZK-2307. Can you try with latest 7.0.3 freshly version?
vincentjian ( 2014-07-31 04:14:42 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a problem in ZK 7.0.2 (also appeared in 7.0.0) - when resize listbox header, corresponding listcell also changing it's size. OK. But if I have a nativebar (especially vertical) - cell resizing is wrong
Sorry, I can't upload screenshot (not enough karma), but here is zul-file. So you need to resize columns to horizontal scrollbar appear
<zk>
<listbox id="box" multiple="true" height="130px">
<custom-attributes org.zkoss.zul.nativebar="true"/> <listhead sizable="true">
<listheader label="Name"/>
<listheader label="Gender"/>
<listheader label="Age"/>
<listheader label="Description"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
<listcell label="18"/>
<listcell label="A young lady."/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
<listcell label="20"/>
<listcell label="A college student."/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
<listcell label="32"/>
<listcell label="A remarkable artist."/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
<listcell label="20"/>
<listcell label="A college student."/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
<listcell label="29"/>
<listcell label="A graduate."/>
</listitem>
</listbox>
</zk>
Hello eduarded,
In order for the column resize to work as expected, you should place the listbox in a window container as shown in the updated code bellow:
<window title="listbox demo" border="normal" width="100%">
<listbox id="box" multiple="true" height="130px">
<listhead sizable="true">
<listheader label="Name"/>
<listheader label="Gender"/>
<listheader label="Age"/>
<listheader label="Description"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
<listcell label="18"/>
<listcell label="A young lady."/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
<listcell label="20"/>
<listcell label="A college student."/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
<listcell label="32"/>
<listcell label="A remarkable artist."/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
<listcell label="20"/>
<listcell label="A college student."/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
<listcell label="29"/>
<listcell label="A graduate."/>
</listitem>
</listbox>
</window>
The columns were not resized correctly because they did not have a parent container with configured dimensions (width).
Best Regards,
Darksu
Thanks for the answer, Darksu.
The problem exists only with a native scrollbar - don't delete <custom-attributes>
and you will see, that the window container doesn't help
It seems related to this known bug: http://tracker.zkoss.org/browse/ZK-2307. Can you try with latest 7.0.3 freshly version?
vincentjian ( 2014-07-31 04:14:42 +0800 )editAsked: 2014-07-08 20:21:44 +0800
Seen: 80 times
Last updated: Jul 21 '14