Uploaded image for project: 'XAP'
  1. XAP
  2. XAP-566

Widgets: Table: Column width sizing issue

    XMLWordPrintableJSON

Details

    Description

      The table column width issue has resurfaced.
      It seems to only happen when the first row is appended to a table, with very long content in one cell. The issue goes away when another row is added.
      Click the 'add row with very long content' button in this xal to see the error:
      <xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
      <macro:macro xmlns:macro="http://openxal.org/core/macro" id="addRow" name="addRow">
      <xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
      <xm:append select="id('messagesTable')">
      <xal:row xmlns:xal="http://openxal.org/ui">
      <xal:cell text="

      {0}

      "/>
      <xal:cell text="

      {1}

      "/>
      <xal:cell text="

      {2}

      "/>
      </xal:row>
      </xm:append>
      </xm:modifications>
      </macro:macro>
      <macro:macro xmlns:macro="http://openxal.org/core/macro" id="removeRows" name="removeRows">
      <xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
      <xm:remove-element select="//table/row"/>
      </xm:modifications>
      </macro:macro>
      <rootPane>

      <verticalBoxPane>
      <horizontalFlowPane height="30px">
      <button text="Add a row with Macro" onCommand="macro:addRow.execute('a','b','c')"/>
      <button text="Add a long row with Macro" onCommand="macro:addRow.execute('a','b','the quick brown fox jumped over the lazy dogs.')"/>
      <button text="Clear Table" onCommand="macro:removeRows.execute()"/>
      </horizontalFlowPane>
      <horizontalBoxPane borderPosition="center" height="500px">
      <table id="messagesTable" height="500px" width="500px">
      <column width="200px">
      <header text="Topic"/>
      </column>
      <column width="200px">
      <header text="Listener"/>
      </column>
      <column width="100px">
      <header text="Content"/>
      </column>
      </table>
      </horizontalBoxPane>
      </verticalBoxPane>
      </rootPane>
      </xal>

      Attachments

        1. tree_table.zip
          9 kB
          Michael Mikhaylov

        Activity

          People

            Unassigned Unassigned
            trevdak Trevor Oldak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: