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

Column and cell are not alignment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • None
    • 8.6.0.1
    • Browser Issue, Components

      Steps to Reproduce

      <zk>
          <zscript><![CDATA[
          List list = new ArrayList();
          for (int i = 0; i < 100; i++) {
              list.add(i);
          }
          ListModelList model = new ListModelList(list);
          ]]>
          </zscript>
          <listbox model="${model}" height="300px">
              <auxhead>
                  <auxheader colspan="3" label="Aux 1"/>
                  <auxheader colspan="2" label="Aux 2"/>
                  <auxheader colspan="1" label="Aux 3"/>
              </auxhead>
              <listhead sizable="true">
                  <listheader id="lh1" width="4%"  label="1 hidden" visible="false" />
                  <listheader id="lh2" width="15%" label="2 visible" />
                  <listheader id="lh3" width="25%" label="3 visible" />
                  <listheader id="lh4" width="35%" label="4 hidden"  visible="false" />
                  <listheader id="lh5" width="25%" label="5 visible" />
                  <listheader id="lh6" width="12%" label="6 hidden " visible="false" />
              </listhead>
              <template name="model">
                  <listitem>
                      <listcell label="1"/>
                      <listcell label="2"/>
                      <listcell label="3"/>
                      <listcell label="4"/>
                      <listcell label="5"/>
                      <listcell label="6"/>
                  </listitem>
              </template>
              <listfoot>
                  <listfooter label="ft 1"/>
                  <listfooter label="ft 2"/>
                  <listfooter label="ft 3"/>
                  <listfooter label="ft 4"/>
                  <listfooter label="ft 5"/>
                  <listfooter label="ft 6"/>
              </listfoot>
          </listbox>
      </zk>
      

      Current Result

      Column and cell are not alignment

      Expected Result

      Column and cell should be alignment

      Workaround

      Use hflex

                  <listheader id="lh1" hflex="4"  label="1 hidden" visible="false" />
                  <listheader id="lh2" hflex="15" label="2 visible" />
                  <listheader id="lh3" hflex="25" label="3 visible" />
                  <listheader id="lh4" hflex="35" label="4 hidden"  visible="false" />
                  <listheader id="lh5" hflex="25" label="5 visible" />
                  <listheader id="lh6" hflex="12" label="6 hidden " visible="false" />
      

            Unassigned Unassigned
            CharlesQiu CharlesQiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: