0

listbox with paging in borderlayout couldn't use style % correctly

asked 2012-06-27 16:57:08 +0800

jasonhoo gravatar image jasonhoo
84 4

I use listbox like this:

<borderlayout>
    <north title=" " border="none" collapsible="true">
       ......
    </north>
    <west title=" " border="none" size="200px" splittable="true" minsize="150" maxsize="300" flex="true" collapsible="true">
      <borderlayout>
          </west>
          <center autoscroll="true" style="background:url(images/_mbg.gif);">
        <west border="none" collapsible="true" title="main" size="280px">
         ......
        </west>
        <center autoscroll="true" >
            <listbox mold="paging" pageSize="15" style="height:100%;width:100%;">
             ......
            </listbox>
        </center>
      <borderlayout>
    </center>
  </borderlayout>

The listbox's paging control always by last column of listbox , the style height 100% isn't avaiable. Someone can help me ? Is it a bug or need some setting?

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2012-07-02 15:50:35 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6
http://www.hybris.com/

instead of setting the width and/or height in %... use hflex and/or vflex

<listbox mold="paging" pageSize="2" hflex="1" vflex="1">

you can get informations here : http://books.zkoss.org/wiki/ZK%20Developer's%20Reference/UI%20Patterns/Hflex%20and%20Vflex

link publish delete flag offensive edit

answered 2012-06-27 17:46:55 +0800

jj gravatar image jj
638 3

jasonhoo,
Your example is not a well-formed XML. Please provide a working example so that your problem can be reproduced.Otherwise, there is no way to trouble shoot.
I created the following code based on my guess of what you want to do, and it shows up fine.

<borderlayout>
    <north title=" " border="none" collapsible="true">
       ......
    </north>
    <west title=" " border="none" size="200px" splittable="true" minsize="150" maxsize="300" flex="true" collapsible="true">
    </west>
    <center>
      <borderlayout>
        <west border="none" collapsible="true" title="main" size="280px">
         ......
        </west>
        <center autoscroll="true" >
            <listbox mold="paging" pageSize="2" style="height:100%;width:100%;">
            	<listitem label="xxx" />
            	<listitem label="yyy" />
            	<listitem label="zzz" />
            </listbox>
        </center>
      </borderlayout>
    </center>
  </borderlayout>

link publish delete flag offensive edit

answered 2012-06-28 17:52:53 +0800

jasonhoo gravatar image jasonhoo
84 4

Thanks,but my questions is two:
1, why isn't the listbox's paging control in the bottom of the listbox but next to last column;
2, why width is 100% cause the scroll...

I use the IE9.0 or Firefox 13.0.1 with Zk6.0.1, and you?

<borderlayout>
  <west size="280px"/>
    <center>
      <listbox mold="paging" pageSize="2" height="100%" width="100%">
        <listitem label="xxx" />
        <listitem label="yyy" />
        <listitem label="zzz" />
      </listbox>
    </center>
</borderlayout>

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: 2012-06-27 16:57:08 +0800

Seen: 195 times

Last updated: Jul 04 '12

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