0

Scroll bar not appearing in listbox in IE and firefox

asked 2010-06-21 01:19:19 +0800

jaikarthik gravatar image jaikarthik
69

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

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2010-06-21 09:00:33 +0800

vinhvo gravatar image vinhvo
369 3

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>

link publish delete flag offensive edit

answered 2010-06-21 09:09:09 +0800

jaikarthik gravatar image jaikarthik
69

updated 2010-06-21 09:09:50 +0800

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

link publish delete flag offensive edit

answered 2010-06-21 09:17:51 +0800

vinhvo gravatar image vinhvo
369 3

updated 2010-06-21 09:18:31 +0800

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>

link publish delete flag offensive edit

answered 2010-06-21 09:20:50 +0800

jaikarthik gravatar image jaikarthik
69

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

link publish delete flag offensive edit

answered 2010-06-21 09:28:40 +0800

vinhvo gravatar image vinhvo
369 3

how about in 1st hack we set <div> a bit bigger 1600 for ex. SO we will only have one scrollbar of <div>

link publish delete flag offensive edit

answered 2010-06-22 00:48:24 +0800

jaikarthik gravatar image jaikarthik
69

thats good idea but if i use paging then it will cause problem. :(

link publish delete flag offensive edit

answered 2010-06-22 13:51:22 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

hi,

Why not use a blank listitem to let browser display the scrollbar?

link publish delete flag offensive edit

answered 2010-06-30 06:39:06 +0800

jaikarthik gravatar image jaikarthik
69

Thx Chen ur solution works :)

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2010-06-21 01:19:19 +0800

Seen: 649 times

Last updated: Jun 30 '10

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