Note that there are some explanatory texts on larger screens.

plurals
  1. POZK Listbox: Horizontal scrollbar not appearing with hflex=min (in other container/Tabbox)
    primarykey
    data
    text
    <p>Here's a snap of the problem:</p> <p><a href="http://www.flickr.com/photos/76533037@N02/6868883627/" rel="nofollow">Link to a picture of the problem</a></p> <p>Layout works correctly without hflex="min" - but of course then the columns are too narrow. Here is the blowup:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?&gt; &lt;zk&gt; &lt;style&gt; .module-alternative-amount-cell { text-align: right; } .cost-entry-alternative-amount-cell { text-align: right; } &lt;/style&gt; &lt;window id="thisEditor" width="99%"&gt; &lt;!-- header label --&gt; &lt;vbox&gt; &lt;space height="5px" /&gt; &lt;hbox&gt; &lt;space width="5px" /&gt; &lt;label id="header" value="A header" style="font-weight:bold;font-size:16px;color:#525252" /&gt; &lt;/hbox&gt; &lt;space height="5px" /&gt; &lt;/vbox&gt; &lt;groupbox mold="3d"&gt; &lt;caption label="General Information" style="font-weight:bold"&gt; &lt;/caption&gt; &lt;grid&gt; &lt;columns&gt; &lt;column label="" width="20%" valign="top" /&gt; &lt;column label="" width="80%" valign="top" /&gt; &lt;/columns&gt; &lt;rows&gt; &lt;row style="background: white;border:none"&gt; &lt;label value="Name" /&gt; &lt;textbox id="nameText" width="350px" &gt;&lt;/textbox&gt; &lt;/row&gt; &lt;/rows&gt; &lt;/grid&gt; &lt;/groupbox&gt; &lt;space height="5px" /&gt; &lt;groupbox mold="3d"&gt; &lt;tabbox id="editorTabbox"&gt; &lt;tabs&gt; &lt;tab label="A" /&gt; &lt;tab label="M" /&gt; &lt;/tabs&gt; &lt;tabpanels&gt; &lt;tabpanel &gt; &lt;listbox &gt; &lt;listhead sizable="true"&gt; &lt;listheader label="Name" sort="auto(name)" sortDirection="descending" /&gt; &lt;listheader label="Description" /&gt; &lt;/listhead&gt; &lt;listitem &gt; &lt;listcell label="n1" /&gt; &lt;listcell label="d1" /&gt; &lt;/listitem&gt; &lt;listitem &gt; &lt;listcell label="n2" /&gt; &lt;listcell label="d2" /&gt; &lt;/listitem&gt; &lt;/listbox&gt; &lt;/tabpanel&gt; &lt;tabpanel id="mtp" &gt; &lt;vbox id="modulesTabpanelVbox" spacing="2" width="99%"&gt; &lt;listbox &gt; &lt;listhead sizable="true"&gt; &lt;listheader label="Name" sort="auto(name)" sortDirection="descending" hflex="min"/&gt; &lt;listheader label="Description Description Description Description Description Description" hflex="min" /&gt; &lt;listheader label="Description Description Description Description Description" hflex="min" /&gt; &lt;listheader label="Description" hflex="min"/&gt; &lt;listheader label="Description" hflex="min"/&gt; &lt;/listhead&gt; &lt;listitem &gt; &lt;listcell label="n1" /&gt; &lt;listcell label="d1" /&gt; &lt;listcell label="d1" /&gt; &lt;listcell label="d1" /&gt; &lt;listcell label="d1" /&gt; &lt;/listitem&gt; &lt;listitem &gt; &lt;listcell label="n2" /&gt; &lt;listcell label="d2" /&gt; &lt;listcell label="d2" /&gt; &lt;listcell label="d2" /&gt; &lt;listcell label="d2" /&gt; &lt;/listitem&gt; &lt;/listbox&gt; &lt;listbox &gt; &lt;listhead sizable="true"&gt; &lt;listheader label="Name" sort="auto(name)" sortDirection="descending" hflex="min"/&gt; &lt;listheader label="Description" hflex="min"/&gt; &lt;listheader label="Description Description Description Description Description" hflex="min"/&gt; &lt;listheader label="Description" hflex="min"/&gt; &lt;listheader label="Description Description Description Description" hflex="min"/&gt; &lt;/listhead&gt; &lt;listitem &gt; &lt;listcell label="n1" /&gt; &lt;listcell label="d1" /&gt; &lt;listcell label="d1" /&gt; &lt;listcell label="d1" /&gt; &lt;listcell label="d1" /&gt; &lt;/listitem&gt; &lt;listitem &gt; &lt;listcell label="n2" /&gt; &lt;listcell label="d2" /&gt; &lt;listcell label="d2" /&gt; &lt;listcell label="d2" /&gt; &lt;listcell label="d2" /&gt; &lt;/listitem&gt; &lt;/listbox&gt; &lt;/vbox&gt; &lt;/tabpanel&gt; &lt;/tabpanels&gt; &lt;/tabbox&gt; &lt;/groupbox&gt; &lt;/window&gt; &lt;/zk&gt; </code></pre> <p>For the sake of the length of the example I added only a few columns, please make the browser window narrow to see the problem and then reload the page.</p> <p>(edit: I added sizable=true on the listhead, now you can force a horizontal scrollbar to appear by making the column wider. Furthermore the scrollbar can only be made to appear if there are two tabs.)</p> <p>Background: I found some questions that might be going in the same direction, but a solution for my problem I didn't find. Beware that I don't want to add 'overflow: auto;" to the tabpanel - that destroys the use Tabpanel for me. In fact I have an outer tabpanel around this code and would have to add the scrollbar there, which makes all tabpanels grow scrollbars... and the scrollbar isn't even on the bottom of the tabpanel's space. Sorry if this is convoluted, if you layed out stuff like this you probably have an idea. Furthermore I don't want fixed sizes of course.</p> <p>On a sidenote: shrinking the (browser)window is not shrinking the listbox - growing it is no problem. Something's up here!</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload