<?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 : Bug report: Ribbon group resize problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Bug report: Ribbon group resize problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 05:38:57 +0000</pubDate>
  <lastBuildDate>Tue, 14 Aug 2007 18:37: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=7786</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[Bug report: Ribbon group resize problem : I think we should wait for fixed...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25113&amp;title=bug-report-ribbon-group-resize-problem#25113</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3036">Jimor Marlow</a><br /><strong>Subject:</strong> 7786<br /><strong>Posted:</strong> 14 August 2007 at 6:37pm<br /><br />I think we should wait for fixed release. But forewhile you can use workaround I&#8217;ve wrote above:<br />Move all button after galley, and specify the first button as start of new group (btn-&gt;SetBeginGroup(TRUE)).<br /><br />My sample:<br /><table width="99%"><tr><td><pre class="BBcode"><br />BOOL CMainFrame::AddWindowArrangeGroup(CXTPRibbonTab* pTab)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;ASSERT( pTab );<br />&nbsp;&nbsp;&nbsp;&nbsp;CXTPRibbonGroup* pGroup = pTab-&gt;AddGroup( ID_GALLERY_WINDOWS/*"Window"*/ );<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;// &#1043;&#1072;&#1083;&#1077;&#1088;&#1077;&#1103; &#1074;&#1099;&#1073;&#1086;&#1088;&#1072; &#1088;&#1072;&#1079;&#1084;&#1077;&#1088;&#1086;&#1074; &#1089;&#1087;&#1083;&#1080;&#1090;&#1072;<br />&nbsp;&nbsp;&nbsp;&nbsp;CXTPControlGallery* pControlGallery = (CXTPControlGallery*)pGroup-&gt;Add(new CXTPControlGallery(), ID_GALLERY_WINDOWS);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;pControlGallery-&gt;SetControlSize(CSize(235, 60));<br />&nbsp;&nbsp;&nbsp;&nbsp;pControlGallery-&gt;SetItemsMargin(0, 1, 0, 1);<br />&nbsp;&nbsp;&nbsp;&nbsp;pControlGallery-&gt;ShowLabels(FALSE);<br />&nbsp;&nbsp;&nbsp;&nbsp;pControlGallery-&gt;ShowBorders(TRUE);<br />&nbsp;&nbsp;&nbsp;&nbsp;pControlGallery-&gt;SetItems(m_pItemsWindowsSplit);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;CMenu menuQuickStyles;<br />&nbsp;&nbsp;&nbsp;&nbsp;menuQuickStyles.LoadMenu(ID_WINDOWS_SPLIT_QUICKWINDOWS);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(GetCommandBars());<br />&nbsp;&nbsp;&nbsp;&nbsp;pPopupBar-&gt;LoadMenu(menuQuickStyles.GetSubMenu(0));<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pControlGallery-&gt;SetCommandBar(pPopupBar);<br />&nbsp;&nbsp;&nbsp;&nbsp;pPopupBar-&gt;EnableAnimation();<br />&nbsp;&nbsp;&nbsp;&nbsp;pPopupBar-&gt;InternalRelease();<br /><br />// WORKAROUND: Buttons moved here<br />&nbsp;&nbsp;&nbsp;&nbsp;pGroup-&gt;Add(xtpControlButton, ID_WINDOW_CASCADE)-&gt;SetBeginGroup(TRUE); // &lt;- Don&#8217;t foreget to set  begin group!!!<br />&nbsp;&nbsp;&nbsp;&nbsp;pGroup-&gt;Add(xtpControlButton, ID_WINDOW_ARRANGE);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;return TRUE;<br />}<br /></pre></td></tr></table><br /><br />It's work fine.]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 18:37:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25113&amp;title=bug-report-ribbon-group-resize-problem#25113</guid>
  </item> 
  <item>
   <title><![CDATA[Bug report: Ribbon group resize problem : Hi,We&amp;#039;re having the same...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25108&amp;title=bug-report-ribbon-group-resize-problem#25108</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2664">sulla138</a><br /><strong>Subject:</strong> 7786<br /><strong>Posted:</strong> 14 August 2007 at 1:49pm<br /><br />Hi,<br>We're having the same issue. How can I get your fix?<br><br>thanks,<br>Mike<br>]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 13:49:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25108&amp;title=bug-report-ribbon-group-resize-problem#25108</guid>
  </item> 
  <item>
   <title><![CDATA[Bug report: Ribbon group resize problem : Hello,  Thanks, fixed now. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25075&amp;title=bug-report-ribbon-group-resize-problem#25075</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7786<br /><strong>Posted:</strong> 14 August 2007 at 1:19am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Thanks, fixed now.</DIV>]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 01:19:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25075&amp;title=bug-report-ribbon-group-resize-problem#25075</guid>
  </item> 
  <item>
   <title><![CDATA[Bug report: Ribbon group resize problem : FYI: Xtreme ToolkitPro v11.1.3...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25065&amp;title=bug-report-ribbon-group-resize-problem#25065</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3036">Jimor Marlow</a><br /><strong>Subject:</strong> 7786<br /><strong>Posted:</strong> 13 August 2007 at 3:44pm<br /><br />FYI: Xtreme ToolkitPro v11.1.3]]>
   </description>
   <pubDate>Mon, 13 Aug 2007 15:44:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25065&amp;title=bug-report-ribbon-group-resize-problem#25065</guid>
  </item> 
  <item>
   <title><![CDATA[Bug report: Ribbon group resize problem : I&amp;#039;m afraid I&amp;#039;ve found...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25064&amp;title=bug-report-ribbon-group-resize-problem#25064</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3036">Jimor Marlow</a><br /><strong>Subject:</strong> 7786<br /><strong>Posted:</strong> 13 August 2007 at 3:40pm<br /><br />I'm afraid I've found the bug in ribbon group reduce logic for gallery and button.<br /><br />You can see this in RibbonSample. Just add simple button before styles gallery control, f.e.:<br /><br />MainFrm.cpp, ln.598:<br />BOOL CMainFrame::CreateRibbonBar() {<br />...<br />CXTPRibbonGroup* pGroupStyles = pTabHome-&gt;AddGroup(ID_GROUP_STYLES);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />pGroupStyles-&gt;Add(xtpControlButton, ID_CHAR_ITALIC); // &lt;- Resize bug when reducing<br /><br />pControlGallery = (CXTPControlGallery*)pGroupStyles-&gt;Add(new CXTPControlGallery(), ID_GALLERY_STYLES);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />...<br />}<br /><br />add any simple button, run app, and start to reduce width of main frame. When styles group start to reduce its width you'll get stuck in the endless loop, trying to reduce group size in the<br />BOOL CXTPRibbonGroup::OnReduceSize(int nLevel){<br />...<br />do<br />{<br />  bReduced = FALSE;<br /><br />  for (int nLevel = 0; nLevel &lt; 4; nLevel++)<br />  {<br />&nbsp;&nbsp;&nbsp;&nbsp;for (int i = GetCount() - 1; i &gt;= 0; i--)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPRibbonGroup* pGroup = GetAt(i);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!pGroup-&gt;IsVisible())<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continue;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pGroup-&gt;OnReduceSize(nLevel)) // ln.754, here the bug, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// on nLevel=2, this procedure still signaled TRUE,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// like it successfully reduced, instead of fail.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  pWidth<em> = pGroup-&gt;OnCalcDynamicSize(pDC);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  bReduced = TRUE;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  break;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if (bReduced)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if (bReduced)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nResult = _CalcSmartLayoutToolBar(pWidth);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (nResult &lt; nWidth)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />  }<br />  while (bReduced);<br />}<br /><br />Fix it, please.<br /><br />I've forund workaround for current code forewhile:<br />add button after gallery and SetBeginGroup(TRUE) for button (important condition!). In this case all works fine. <br /><br />f.e:<br />// BOOL CMainFrame::CreateRibbonBar(), ln.~618<br />pGroupStyles-&gt;Add(xtpControlButtonPopup, ID_STYLES_CHANGE);<br />pGroupStyles-&gt;Add(xtpControlButton, ID_CHAR_ITALIC)-&gt;SetBeginGroup(TRUE); // workaround for resize bug <br /><br />CXTPRibbonGroup* pGroupFind = pTabHome-&gt;AddGroup(ID_GROUP_FIND);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]>
   </description>
   <pubDate>Mon, 13 Aug 2007 15:40:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7786&amp;PID=25064&amp;title=bug-report-ribbon-group-resize-problem#25064</guid>
  </item> 
 </channel>
</rss>