1

ZK 7.X - Horizontal Scroll Bar hides the last row of listbox

asked 2014-11-18 17:25:39 +0800

blin gravatar image blin
45 3

updated 2014-12-02 04:28:03 +0800

vincentjian gravatar image vincentjian
2245 6

In ZK 7.X, when total width of columns exceeds the maximum width of a listbox, a horizontal scroll bar appears when you hover over the listbox. However this horizontal scroll bar hides the last row in the list. Is there a way to display the horizontal scroll bar without hiding the last row of the listbox? Thanks in advance!

Example:

<window title="listbox demo" border="normal" width="250px">
<listbox id="box">
    <listhead sizable="true">
        <listheader label="name" sort="auto" width="150px"/>
        <listheader label="gender" sort="auto" width="150px"/>
    </listhead>
    <listitem>
        <listcell label="Mary" />
        <listcell label="FEMALE" />
    </listitem>
    <listitem>
        <listcell label="John" />
        <listcell label="MALE" />
    </listitem>
    <listitem>
        <listcell label="Jane" />
        <listcell label="FEMALE" />
    </listitem>
    <listitem>
        <listcell label="Henry" />
        <listcell label="MALE" />
    </listitem>
    <listfoot>
        <listfooter>
            <label value="This is footer1" />
        </listfooter>
        <listfooter>
            <label value="This is footer2" />
        </listfooter>
    </listfoot>
</listbox>
</window>
delete flag offensive retag edit

4 Answers

Sort by ยป oldest newest most voted
2

answered 2014-12-01 19:51:51 +0800

windeyu gravatar image windeyu flag of United States
288 3

updated 2014-12-02 04:27:28 +0800

vincentjian gravatar image vincentjian
2245 6

I think it maybe due to change to the default value for nativebar in 7.0.2.

In 7.0.2 release note: "Due to the better user-friendly for the scrollbar layout, we changed the org.zkoss.zul.nativebar of the library property to true by default for Grid, Listbox, Tree and Borderlayout component."

You can try to change the property to true in zk.xml of your current ZK version.

<library-property>
    <name>org.zkoss.zul.nativebar</name>
    <value>true</value>
</library-property>
link publish delete flag offensive edit
2

answered 2014-11-18 20:58:36 +0800

Darksu gravatar image Darksu
1991 1 4

Hello blin,

Could you please give more information on your environment setup because i tested your code with ZK version 7.0.2 and it works correctly.

Furthermore is there a reason that you have defined your listheader widths and specifically with greater values than your window width? It is recommended to use percentages.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2014-12-01 16:59:59 +0800

blin gravatar image blin
45 3

Hi Darksu,

Thank you for your response! I defined the listheader widths in absolute value order for the horizontal scroll bar to show, but looks like the problem can only be duplicated in our environment. We use ZK default breeze theme.

I compared this simple zul within our development environment vs. ZK Fiddle by using Breeze 7.0.2 and found some difference in style.

1) For z-listbox-body, our enviornment set it to "overflow:hidden", zk Fiddle set it to"overflow:auto"

2) Our environment has an extra element having zk-scrollbar / zk-scrollbar-horizonal style, zk Fiddle has no such element

Please click the following link for a screenshot to get a clearer view. http://picpaste.com/example-07hw4piq.png

Could you please advice on what might cause these differences?

Thanks in advance! Bing

link publish delete flag offensive edit
0

answered 2014-12-02 13:02:47 +0800

blin gravatar image blin
45 3

Thank you so much and this solved my problem !!! Bing

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2014-11-18 17:25:39 +0800

Seen: 39 times

Last updated: Dec 02 '14

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