<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : HOWTO: Use BestFit() in tree like mode</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : HOWTO: Use BestFit() in tree like mode]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 07:52:08 +0000</pubDate>
  <lastBuildDate>Thu, 30 Jun 2011 12:56:38 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=18279</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[HOWTO: Use BestFit() in tree like mode :  Hi Martin and Chris,could you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=65076&amp;title=howto-use-bestfit-in-tree-like-mode#65076</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1755">ABuenger</a><br /><strong>Subject:</strong> 18279<br /><strong>Posted:</strong> 30 June 2011 at 12:56pm<br /><br />Hi Martin and Chris,<br><br>could you create a small sample that demonstrates your problem and then attach it to a new ticket or here?<br><br>Andre<br><br>]]>
   </description>
   <pubDate>Thu, 30 Jun 2011 12:56:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=65076&amp;title=howto-use-bestfit-in-tree-like-mode#65076</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Use BestFit() in tree like mode : Hi,One work around I have found,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=65070&amp;title=howto-use-bestfit-in-tree-like-mode#65070</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6605">ChrisBamford</a><br /><strong>Subject:</strong> 18279<br /><strong>Posted:</strong> 30 June 2011 at 9:22am<br /><br />Hi,<br><br>One work around I have found, which is not a perfect solution, is to find the deepest leaf in the tree and then add a child record to that leaf (call this pChild for example).<br><br>This helps force the column width of the parent record of pChild to be something more appropriate.<br><br>Thx, Chris.<br><br>]]>
   </description>
   <pubDate>Thu, 30 Jun 2011 09:22:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=65070&amp;title=howto-use-bestfit-in-tree-like-mode#65070</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Use BestFit() in tree like mode :  Hi, I have a similar issue to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=65049&amp;title=howto-use-bestfit-in-tree-like-mode#65049</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6605">ChrisBamford</a><br /><strong>Subject:</strong> 18279<br /><strong>Posted:</strong> 29 June 2011 at 5:34am<br /><br />Hi, I have a similar issue to this with version 13.4.2.<br><br>I have a tree structure that can be up to 4 levels deep, e.g.:<br><table width="99%"><tr><td><pre class="BBcode"><br>Parent<br>+- Child1<br>&nbsp;+- Child2<br>&nbsp; +- Child3<br>&nbsp;&nbsp; +- Child4<br></pre></td></tr></table><br><br>The issue for me is that after calling BestFit for all columns on a report control, the second column (which is the tree column, is not resized as I would expect.&nbsp; Following is an example screenshot.<br><img src="uploads/6605/CodeJockSupport2.png" height="244" width="370" border="0" /><br><br>Here is the code I'm using to call BestFit<br><table width="99%"><tr><td><pre class="BBcode"><br>CXTPReportColumns * pColumns = pthis-&gt;m_xtFileList.GetColumns();<br>pthis-&gt;m_xtFileList.GetReportHeader()-&gt;BestFit(pColumns-&gt;GetAt(1));<br>pthis-&gt;m_xtFileList.GetReportHeader()-&gt;BestFit(pColumns-&gt;GetAt(2));<br>pthis-&gt;m_xtFileList.GetReportHeader()-&gt;BestFit(pColumns-&gt;GetAt(3));<br>pthis-&gt;m_xtFileList.GetReportHeader()-&gt;BestFit(pColumns-&gt;GetAt(4));<br></pre></td></tr></table><br><br>pthis is a pointer to the current dialog.<br><br>And here is the code I'm using to create the columns:<br><table width="99%"><tr><td><pre class="BBcode"><br>m_xtFileList.AddColumn(new CXTPReportColumn(0, _T("Delete"), 20, TRUE, 0));<br>m_xtFileList.AddColumn(new CXTPReportColumn(1, _T("Filename"), 250, TRUE));<br>m_xtFileList.AddColumn(new CXTPReportColumn(2, _T("Type"), 125, TRUE));<br>m_xtFileList.AddColumn(new CXTPReportColumn(3, _T("Created"), 75, TRUE));<br>m_xtFileList.AddColumn(new CXTPReportColumn(4, _T("File Size"), 100, TRUE));<br><br>m_xtFileList.GetColumns()-&gt;Find(2)-&gt;SetTreeColumn(TRUE);<br>m_xtFileList.GetColumns()-&gt;Find(0)-&gt;GetEditOptions()-&gt;m_bAllowEdit = FALSE;<br>m_xtFileList.GetColumns()-&gt;Find(1)-&gt;GetEditOptions()-&gt;m_bAllowEdit = FALSE;<br>m_xtFileList.GetColumns()-&gt;Find(2)-&gt;GetEditOptions()-&gt;m_bAllowEdit = FALSE;<br>m_xtFileList.GetColumns()-&gt;Find(3)-&gt;GetEditOptions()-&gt;m_bAllowEdit = FALSE;<br>m_xtFileList.GetColumns()-&gt;Find(4)-&gt;GetEditOptions()-&gt;m_bAllowEdit = FALSE;<br>m_xtFileList.GetColumns()-&gt;Find(4)-&gt;SetAlignment(xtpColumnTextRight);<br>m_xtFileList.GetColumns()-&gt;Find(4)-&gt;SetHeaderAlignment(DT_RIGHT);<br><br>m_xtFileList.GetReportHeader()-&gt;SetAutoColumnSizing(TRUE);<br>m_xtFileList.GetReportHeader()-&gt;AllowColumnResize(TRUE);<br>m_xtFileList.GetReportHeader()-&gt;AllowColumnRemove(FALSE);<br>m_xtFileList.GetReportHeader()-&gt;AllowColumnReorder(FALSE);<br>m_xtFileList.SetMultipleSelection(FALSE);<br>m_xtFileList.FocusSubItems(FALSE);<br>m_xtFileList.GetPaintManager()-&gt;SetColumnStyle(xtpReportColumnOffice2007);<br>m_xtFileList.Populate();<br></pre></td></tr></table><br><br>Hopefully I've not broken any forum rules in this post.&nbsp; Many thanks for any help/advice that can be provided.<br><br>Chris.<br>]]>
   </description>
   <pubDate>Wed, 29 Jun 2011 05:34:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=65049&amp;title=howto-use-bestfit-in-tree-like-mode#65049</guid>
  </item> 
  <item>
   <title><![CDATA[HOWTO: Use BestFit() in tree like mode :  Hi:I can&amp;#039;t figure out how...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=64087&amp;title=howto-use-bestfit-in-tree-like-mode#64087</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 18279<br /><strong>Posted:</strong> 27 April 2011 at 4:10am<br /><br />Hi:<br><br>I can't figure out how to use CXTPReportHeader::BestFit() in tree-like control mode. It works very well in simple mode, but in tree-like mode with collapsed nodes the calculated column width is wrong. It seems as if only visible rows are considered.<br>How can I calculate the required width over all rows whether they are collapsed or not?<br>First expanding all nodes and then collapsing them again on startup/reload is no option because this would take a long time to process.<br><br>TIA<br>]]>
   </description>
   <pubDate>Wed, 27 Apr 2011 04:10:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18279&amp;PID=64087&amp;title=howto-use-bestfit-in-tree-like-mode#64087</guid>
  </item> 
 </channel>
</rss>