-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all
I'm not getting horizontal scroll in listbox if there are no items inside the box. this issue occurs onlt in IE and Firefox. Scrollbar ia available in chrome. i tried Sample in zk demo and the same situstion occurs there. any help appretiated
<zk>
<listbox id="box" fixedLayout="true" width="100%">
<listhead>
<listheader label="Name" width="300px"/>
<listheader label="Gender" width="300px"/>
<listheader label="Age" width="300px"/>
<listheader label="Description1" width="300px"/>
<listheader label="Description2" width="300px"/>
</listhead>
</listbox>
</zk>
Thanks
Jaikarthik Natarajan
I do not really know how to fix that . However, can you use :
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?>
<zk>
<listbox id="box" fixedLayout="true" width="100%" >
<listhead>
<listheader label="Name" width="20%"/>
<listheader label="Gender" width="20%"/>
<listheader label="Age" width="20%"/>
<listheader label="Description1" width="20%"/>
<listheader label="Description2" width="20%"/>
</listhead>
</listbox>
</zk>
thx vinhvo...
giving all headers in % will compress and fit entire content in view but i want to give specific width. this issue doesnot arrise if there is content inside listbox. I really cant understand why this is happening
2 quick hacks:
<div width="1500px" style="overflow:auto">
<listbox id="box" fixedLayout="true" >
<listhead>
<listheader label="Name" width="300px"/>
<listheader label="Gender" width="300px"/>
<listheader label="Age" width="300px"/>
<listheader label="Description1" width="300px"/>
<listheader label="Description2" width="300px"/>
</listhead>
<listitem>
</listitem>
</listbox>
</div
or
<listbox id="box" width="1500px" fixedLayout="true">
<listhead>
<listheader label="Name" width="300px"/>
<listheader label="Gender" width="300px"/>
<listheader label="Age" width="300px"/>
<listheader label="Description1" width="300px"/>
<listheader label="Description2" width="300px"/>
</listhead>
<listitem>
</listitem>
</listbox>
thanks vinhvo
i have tried both hacks. first will provide scrollbar outside the listbox so when we have content inside there will be 2 scrollbars and second hack will cause the problems when resolution is changed
thats good idea but if i use paging then it will cause problem. :(
hi,
Why not use a blank listitem to let browser display the scrollbar?
Thx Chen ur solution works :)
Asked: 2010-06-21 01:19:19 +0800
Seen: 649 times
Last updated: Jun 30 '10