<?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 : TaskPanel not sizing added controls properly?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Task Panel : TaskPanel not sizing added controls properly?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 07 Jun 2026 01:54:31 +0000</pubDate>
  <lastBuildDate>Tue, 06 Dec 2011 15:21:06 +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=17529</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[TaskPanel not sizing added controls properly? : Hi,  I&amp;#039;ve been struggling...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17529&amp;PID=67062&amp;title=taskpanel-not-sizing-added-controls-properly#67062</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3873">RedFin</a><br /><strong>Subject:</strong> 17529<br /><strong>Posted:</strong> 06 December 2011 at 3:21pm<br /><br /><p>Hi,</p><p>I've been struggling with this as well, and have come up with something of a solution for me ... hopefully it might help ...</p><p>My taskpanel is on a user control and looks like this ...</p><p><p><img src="uploads/3873/TaskPanel.PNG" height="337" width="662" border="0" /></p><p>It has just 2 groups. The first, for "Settings", is a fixed size. &nbsp;The second group is the "Results". &nbsp;I needed the second group to change size depending on whether the first group is expanded or not. &nbsp;Each taskpanel group has just a single picture box control assigned to it. &nbsp;Once the picture box is resized, its own resize event takes care of all of the individual controls.</p><p>Here's the code I used -<br></p><p><blockquote>Private Enum TaskPanelGroups<br><blockquote>    tpgSettings = 1<br></blockquote><blockquote>    tpgResults<br></blockquote><p>End Enum</p><p>Private Sub TaskPanel1_GroupExpanded(ByVal Group As XtremeTaskPanel.ITaskPanelGroup)<br></p></blockquote><blockquote><blockquote>With TaskPanel1<br></blockquote></blockquote><blockquote><blockquote><blockquote>If .Groups(tpgSettings).Expanded Then<br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>'settings group IS expanded<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>&nbsp;.Groups(tpgResults).Items(1).SetSize picResults.width, (UserControl.ScaleHeight / 15) - 140, False<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote>        Else<br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>            'settings group NOT expanded<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>                .Groups(tpgResults).Items(1).SetSize picResults.width, (UserControl.ScaleHeight / 15) - 45, False<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote>        End If<br></blockquote></blockquote></blockquote><blockquote><blockquote>    End With<br></blockquote></blockquote><blockquote><p>End Sub</p></blockquote>It was a matter of trial and error to work out how much to adjust the height by.</p><p>Hopefully this might help,</p><p>Rohan</p></p>]]>
   </description>
   <pubDate>Tue, 06 Dec 2011 15:21:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17529&amp;PID=67062&amp;title=taskpanel-not-sizing-added-controls-properly#67062</guid>
  </item> 
  <item>
   <title><![CDATA[TaskPanel not sizing added controls properly? : Hello,I can&amp;#039;t seem to get...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17529&amp;PID=61270&amp;title=taskpanel-not-sizing-added-controls-properly#61270</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6447">Erg</a><br /><strong>Subject:</strong> 17529<br /><strong>Posted:</strong> 05 November 2010 at 1:45pm<br /><br />Hello,<div><br></div><div>I can't seem to get controls added to task panel groups to automatically size properly. &nbsp;I add the controls, set the hwnds, etc. &nbsp;The controls add fine. &nbsp;When resizing, changing the layout, col width, etc., standard controls like command buttons seem to size sometimes but&nbsp;definitely not&nbsp;when multiple columns are not in use. &nbsp;When multiple columns are in use the controls are always as wide as the entire control.</div><div><br></div><div>Also, custom controls added don't seem to size properly at all. &nbsp;I have created a very basic custom control fort testing purposes. &nbsp;I see the SetSize method, but how and when should that be called? &nbsp;Also, the resize event never fires on the control, so how do I know when to size it manually (if that's what is required)? &nbsp;&nbsp;I've tried using the 'automatic height' but my custom controls auto size <i>way </i>to tall.</div><div><br></div><div>When the user resizes the form (and therefore my task panel) do I need to resize each and every control on the task panel manually? &nbsp;There could be 100's, this could be very time consuming.&nbsp;</div><div><br></div><div>Thanks.</div>]]>
   </description>
   <pubDate>Fri, 05 Nov 2010 13:45:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17529&amp;PID=61270&amp;title=taskpanel-not-sizing-added-controls-properly#61270</guid>
  </item> 
 </channel>
</rss>