<?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: SingleSelListBox header in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295027#M4881</link>
    <description>I have something like this:&lt;BR /&gt;

&lt;PRE&gt;SomeTabPage::SomeTabPage(...) : ...
  lstItem(GetReference(), DG::Rect(), DG::ListBox::VScroll, DG::ListBox::NoPartialItems, DG::ListBox::Header, 25)
{
  // ...
  const short tabCnt = 5;
  lstItem.SetTabFieldCount(tabCnt);

  lstItem.SetPosition(xpos, ypos);
  lstItem.SetSize(itmWd, itmHt);
  lstItem.SetFontSize(DG::Font::Small);
  short tabTotWidth = wd - 21; // scroll width
  short tabIdx = 1;
  short tabWid = 15;
  short tabBeg = 0;
  short tabEnd = tabBeg + tabWid;
  lstItem.SetTabFieldProperties(tabIdx, tabBeg, tabEnd, DG::ListBox::Center, DG::ListBox::EndTruncate, true, true);
  lstItem.SetHeaderItemText(tabIdx, "head 1");
  // other header settings here
  // populate list box after
  // ...
}&lt;/PRE&gt;

But the list box is not showing. When I removed the header flag, the list will be created (of course) with no header.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;EDIT&lt;/B&gt;&lt;BR /&gt;
I also tried doing as simple as this:
&lt;PRE&gt;lstItem.SetPosition(xpos, ypos);
lstItem.SetSize(itmWd, itmHt);
lstItem.SetFontSize(DG::Font::Small);
lstItem.Show();&lt;/PRE&gt;
Shows (without header) when header flag is not set; otherwise, no list box is generated.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;EDIT 2&lt;/B&gt;&lt;BR /&gt;
I tried calling HasHeader() and it returns false whether header flag is set or not. &lt;B&gt;Is this a bug?&lt;/B&gt;</description>
    <pubDate>Mon, 15 Aug 2016 07:15:41 GMT</pubDate>
    <dc:creator>ReignBough</dc:creator>
    <dc:date>2016-08-15T07:15:41Z</dc:date>
    <item>
      <title>[SOLVED] SingleSelListBox header</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295025#M4879</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello&lt;BR /&gt;&lt;BR /&gt;How to set up header columns?&lt;BR /&gt;I'm doing the following but it shows the first column only&lt;BR /&gt;&lt;BR /&gt;lbNodes.SetHeaderItemCount(5);&lt;BR /&gt;&lt;BR /&gt;lbNodes.SetHeaderItemSize(1, 50);&lt;BR /&gt;lbNodes.SetHeaderItemSize(2, 50);&lt;BR /&gt;lbNodes.SetHeaderItemSize(3, 50);&lt;BR /&gt;lbNodes.SetHeaderItemSize(4, 50);&lt;BR /&gt;lbNodes.SetHeaderItemSize(5, 50);&lt;BR /&gt;&lt;BR /&gt;lbNodes.SetHeaderItemText(1, "Name"); &lt;BR /&gt;lbNodes.SetHeaderItemText(2, "User"); &lt;BR /&gt;lbNodes.SetHeaderItemText(3, "CPU"); &lt;BR /&gt;lbNodes.SetHeaderItemText(4, "GPU"); &lt;BR /&gt;lbNodes.SetHeaderItemText(5, "GPU Load"); &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;lbNodes.AppendItem ();&lt;BR /&gt;lbNodes.SetTabItemText(DG::ListBox::BottomItem, 1, "server1");&lt;BR /&gt;lbNodes.SetTabItemText(DG::ListBox::BottomItem, 2, "user1");&lt;BR /&gt;lbNodes.SetTabItemText(DG::ListBox::BottomItem, 3, "1");&lt;BR /&gt;lbNodes.SetTabItemText(DG::ListBox::BottomItem, 4, "2");&lt;BR /&gt;lbNodes.SetTabItemText(DG::ListBox::BottomItem, 5, "50%");&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:37:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295025#M4879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T13:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: SingleSelListBox header</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295026#M4880</link>
      <description>I think you dont need to use SetHeaderItemCount and SetHeaderItemSize.&lt;BR /&gt;
&lt;BR /&gt;
Look at SetTabFieldCount and SetTabFieldProperties.</description>
      <pubDate>Wed, 09 Sep 2015 17:20:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295026#M4880</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2015-09-09T17:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: SingleSelListBox header</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295027#M4881</link>
      <description>I have something like this:&lt;BR /&gt;

&lt;PRE&gt;SomeTabPage::SomeTabPage(...) : ...
  lstItem(GetReference(), DG::Rect(), DG::ListBox::VScroll, DG::ListBox::NoPartialItems, DG::ListBox::Header, 25)
{
  // ...
  const short tabCnt = 5;
  lstItem.SetTabFieldCount(tabCnt);

  lstItem.SetPosition(xpos, ypos);
  lstItem.SetSize(itmWd, itmHt);
  lstItem.SetFontSize(DG::Font::Small);
  short tabTotWidth = wd - 21; // scroll width
  short tabIdx = 1;
  short tabWid = 15;
  short tabBeg = 0;
  short tabEnd = tabBeg + tabWid;
  lstItem.SetTabFieldProperties(tabIdx, tabBeg, tabEnd, DG::ListBox::Center, DG::ListBox::EndTruncate, true, true);
  lstItem.SetHeaderItemText(tabIdx, "head 1");
  // other header settings here
  // populate list box after
  // ...
}&lt;/PRE&gt;

But the list box is not showing. When I removed the header flag, the list will be created (of course) with no header.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;EDIT&lt;/B&gt;&lt;BR /&gt;
I also tried doing as simple as this:
&lt;PRE&gt;lstItem.SetPosition(xpos, ypos);
lstItem.SetSize(itmWd, itmHt);
lstItem.SetFontSize(DG::Font::Small);
lstItem.Show();&lt;/PRE&gt;
Shows (without header) when header flag is not set; otherwise, no list box is generated.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;EDIT 2&lt;/B&gt;&lt;BR /&gt;
I tried calling HasHeader() and it returns false whether header flag is set or not. &lt;B&gt;Is this a bug?&lt;/B&gt;</description>
      <pubDate>Mon, 15 Aug 2016 07:15:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295027#M4881</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2016-08-15T07:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: SingleSelListBox header</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295028#M4882</link>
      <description>Hello, &lt;BR /&gt;
 &lt;BR /&gt;
the problem is in the initializer list. &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;lstItem&lt;E&gt;&lt;/E&gt; size is 0,0 because of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;DG::Rect()&lt;E&gt;&lt;/E&gt; but you'd like to set header size to 25. That's why &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;lstItem&lt;E&gt;&lt;/E&gt;  isn't created because its invalid state. &lt;BR /&gt;
 &lt;BR /&gt;
You should add initial size which height is more than 25: 
&lt;PRE&gt; 
SomeTabPage::SomeTabPage(...) : ... 
  lstItem(GetReference(), DG::Rect(DG::Point (0, 0), DG::Point (100, 100)), DG::ListBox::VScroll, DG::ListBox::NoPartialItems, DG::ListBox::Header, 25) 
{ 
    // ... 
 
    // modify size if initial one isn't appropriate 
    lstItem.SetSize(itmWd, itmHt); 
     
    //... 
} 
&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Apr 2017 15:23:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295028#M4882</guid>
      <dc:creator>Mihaly Palenik</dc:creator>
      <dc:date>2017-04-25T15:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: SingleSelListBox header</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295029#M4883</link>
      <description>Thanks, Mihály Palenik. Most of the dialog items are fine when initialized with DG::Rect() &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;(no parameter)&lt;E&gt;&lt;/E&gt;. And set its size on the body. Now it is working. Thanks again.</description>
      <pubDate>Mon, 15 May 2017 02:11:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-SingleSelListBox-header/m-p/295029#M4883</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2017-05-15T02:11:51Z</dc:date>
    </item>
  </channel>
</rss>

