Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-171

Listbox/Grid columns hflex="1" not correct with hflex="min"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.8
    • Component/s: Components
    • Labels:
      None

      Description

      https://sourceforge.net/tracker/?func=detail&aid=3182114&group_id=152762&atid=785191

      When Grid/Listbox with columns of hflex="1" and hflex="min", the calculation is not correct

      test case

      <zk>
      <div>
      <html>
      <![CDATA[
      <ol>
      <li>You shall see a Listbox with 4 columns. The first two column width fit the content exactly. The 3rd and 4th column width is 2 : 1</li>
      <li>Drag the browser border to extend the browser window width. The 1st and 2nd column width shall not change. The 3rd and 4th column width shall change accordingly but still keep the width propotion of 1: 2</li>
      <li>Press the "invalidate" button, and nothing shall change. The listbox and column keep as was</li>
      <li>Drag the browser border to shrink the browser window width. The 1st and 2nd column width shall not change. The 3rd and 4th column width shall change accordingly but still keep the width propotion of 1: 2</li>
      <li>Keep Drag the browser border to shrink the browser window width the 3rd and 4th columns will shrink to "disappear" and horizontal scrollbar start to appear. Note the 1st and 2nd column still keep their width as was.</li>
      <li>Press the "invalidate" button, and nothing shall change. The listbox and column keep as was</li>
      <li>done</li>
      </ol>
      ]]>
      </html>
      </div>
      <zscript>
      String[] msgs = {
      "ZK Ajax Framework",
      "Server + Client Fusion is a good approach Server + Client Fusion is a good approach",
      "I Love it!",
      "Great Job",
      "ZK Spreadsheet",
      "The Only Solution of Java Web Excel",
      "Awesome! What a framework!",
      "The best!",
      };
      </zscript>
      <listbox id="lbx">
      <listhead sizable="true">
      <listheader label="Product" hflex="min"/>
      <listheader label="Description" hflex="min"/>
      <listheader label="Comment" hflex="2"/>
      <listheader label="Comment 2" hflex="1"/>
      </listhead>
      <listitem>
      <listcell ><label value="${msgs[0]}"></label></listcell>
      <listcell ><label value="${msgs[1]}"></label></listcell>
      <listcell ><label value="${msgs[2]}"></label></listcell>
      <listcell ><label value="${msgs[3]}"></label></listcell>
      </listitem>
      <listitem>
      <listcell ><label value="${msgs[4]}"></label></listcell>
      <listcell ><label value="${msgs[5]}"></label></listcell>
      <listcell ><label value="${msgs[6]}"></label></listcell>
      <listcell ><label value="${msgs[7]}"></label></listcell>
      </listitem>
      </listbox>
      <button label="invalidate" onClick="lbx.invalidate()"/>
      </zk>

        Attachments

          Activity

            People

            Assignee:
            SimonPai SimonPai
            Reporter:
            asukachen asukachen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: