<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Conditionally AppendItem in ListBox in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321727#M1872</link>
    <description>&lt;P&gt;Thanks so much, now the error is obvious. I was setting the text on indexes that was not even rendered..&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 21:18:58 GMT</pubDate>
    <dc:creator>BenjiDev</dc:creator>
    <dc:date>2021-11-18T21:18:58Z</dc:date>
    <item>
      <title>Conditionally AppendItem in ListBox</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321371#M1869</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am making a trace dialog that outputs trace level, location in code and a custom message. It consists of a listbox and some checkboxes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="normal.png" style="width: 235px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/15817iD0E55FC9FE73EB04/image-dimensions/235x166?v=v2" width="235" height="166" role="button" title="normal.png" alt="normal.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When a checkbox is unchecked items with that trace level should not be displayed in the listbox:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abn.png" style="width: 234px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/15819iCA11C81A8D95A737/image-dimensions/234x165?v=v2" width="234" height="165" role="button" title="abn.png" alt="abn.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(The abnormal trace is removed in the above picture)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is that it also removes every item that comes after the removed item (in the above case the removed trace was already last so the bug is not noticed). Unchecking debug removes the error and abnormal trace aswell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="debug.png" style="width: 200px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/15820i113B7B453A6EB52F/image-size/small?v=v2&amp;amp;px=200" role="button" title="debug.png" alt="debug.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Which is unwanted. Only the debug trace should be removed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i do in the code is pretty simple right now: When the value of a checkbox is changed i clear the listbox and populate it again based on the value of the checkboxes. So if for example the trace level is info but that checkbox is unchecked that item won't be appended to the listbox:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="redraw.png" style="width: 601px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/15824iBD84543B9FE15CA0/image-dimensions/601x265?v=v2" width="601" height="265" role="button" title="redraw.png" alt="redraw.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="changed.png" style="width: 472px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/15823i9AB1728B23118740/image-dimensions/472x145?v=v2" width="472" height="145" role="button" title="changed.png" alt="changed.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am pretty confident that the logic in the loop is OK but i am not 100%. Any help is appretiated.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 21:57:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321371#M1869</guid>
      <dc:creator>BenjiDev</dc:creator>
      <dc:date>2021-11-16T21:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally AppendItem in ListBox</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321403#M1870</link>
      <description>&lt;P&gt;Hi,Maybe this can help you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1111.jpg" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/15845i9A3248C65FC16318/image-size/large?v=v2&amp;amp;px=999" role="button" title="1111.jpg" alt="1111.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 01:19:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321403#M1870</guid>
      <dc:creator>leilei</dc:creator>
      <dc:date>2021-11-17T01:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally AppendItem in ListBox</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321422#M1871</link>
      <description>&lt;P&gt;Also, insted index of list item, you can use&amp;nbsp;DG::ListBox::BottomItem.&lt;BR /&gt;Like:&lt;BR /&gt;listBox.SetTabItemText(&amp;nbsp;&amp;nbsp;DG::ListBox::BottomItem, Teb::.....)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 06:40:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321422#M1871</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2021-11-17T06:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally AppendItem in ListBox</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321727#M1872</link>
      <description>&lt;P&gt;Thanks so much, now the error is obvious. I was setting the text on indexes that was not even rendered..&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 21:18:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321727#M1872</guid>
      <dc:creator>BenjiDev</dc:creator>
      <dc:date>2021-11-18T21:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally AppendItem in ListBox</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321728#M1873</link>
      <description>&lt;P&gt;Thanks, i think this is the cleaner way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 21:19:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Conditionally-AppendItem-in-ListBox/m-p/321728#M1873</guid>
      <dc:creator>BenjiDev</dc:creator>
      <dc:date>2021-11-18T21:19:17Z</dc:date>
    </item>
  </channel>
</rss>

