<?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 : Ribbon. Dynamic content for xtpControlButtonPopup</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Ribbon. Dynamic content for xtpControlButtonPopup]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 03:10:58 +0000</pubDate>
  <lastBuildDate>Tue, 21 Apr 2009 09:59: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=14074</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[Ribbon. Dynamic content for xtpControlButtonPopup : Thanks rdhd, good suggestion. I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48193&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48193</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5078">Bart6</a><br /><strong>Subject:</strong> 14074<br /><strong>Posted:</strong> 21 April 2009 at 9:59am<br /><br />Thanks rdhd, good suggestion.<DIV>I have the incoming events that camera's are added or removed - so i can handle the control there as you suggest.</DIV><DIV>Cheers</DIV><DIV>Bart</DIV>]]>
   </description>
   <pubDate>Tue, 21 Apr 2009 09:59:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48193&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48193</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon. Dynamic content for xtpControlButtonPopup : You can obtain the popup at any...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48169&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48169</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 14074<br /><strong>Posted:</strong> 20 April 2009 at 3:46pm<br /><br />You can obtain the popup at any time. You probably want to do that whenever your internal collection changes. Otherwise you will have to try and intercept the user's click (possibly by subclassing the popup control).<DIV>&nbsp;</DIV><DIV>Use the CXTPCommandBars::FindControl member to find your popup. A popup has its own command bar. So once you have the CXTPControlPopup returned from the first call, call the GetCommandBar member of the popup object and then the GetControls method of the command bar. Then it's probably easiest to simply call RemoveAll on the controls object and then repopulate the controls. No pun intended.</DIV><DIV>&nbsp;</DIV><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (CXTPCommandBars* pCommandBars = pMainFrame-&gt;GetCommandBars())</P><P>{</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (CXTPControl* pControl = pCommandBars-&gt;FindControl(xtpControlError, nApplicationDefinedControlId, FALSE, TRUE))</P><P>{</P><P>XTPControlType Type = pControl-&gt;GetType();</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2>( xtpControlPopup == Type )</P><P>{</P><P>CXTPControlPopup* pPopupControl = (CXTPControlPopup*)pControl;</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2>( pPopupControl )</P><P>{</P><P>CXTPCommandBar* pCommandBar = pControl-&gt;GetCommandBar();</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2>( pCommandBar )</P><P>{</P><P>CXTPControls popupControls = pCommandBar-&gt;GetControls();</P><DIV>&nbsp;</DIV><DIV>if( popupControls )</DIV><DIV>{</DIV><DIV>popupControls-&gt;RemoveAll();</DIV><DIV>&nbsp;</DIV><DIV>for( int Index = 0; Index &lt; nNumberOfNewControls; Index++ )</DIV><DIV>{</DIV><DIV>popupControls-&gt;Add( ... );</DIV><DIV>}</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>}</DIV><P>}</P><P>}</P><P>}</P><P>}</P><DIV></DIV><P>Above code not guranteed to compile. I copied some from an app and then modified in this reply ...</FONT></P>]]>
   </description>
   <pubDate>Mon, 20 Apr 2009 15:46:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48169&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48169</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon. Dynamic content for xtpControlButtonPopup : Thanks Oleg,  The dynamic Popup...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48138&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5078">Bart6</a><br /><strong>Subject:</strong> 14074<br /><strong>Posted:</strong> 20 April 2009 at 4:40am<br /><br />Thanks Oleg,<DIV>&nbsp;</DIV><DIV>The dynamic Popup sample creates the content <U>once</U>, in the OnCreateControl member of CMainFrame. From then on, it doesn't change anymore (as far as i can see)</DIV><DIV>&nbsp;</DIV><DIV>What i'm looking for is that i set the content each time the user clicks on the control (so i can set the control content, based on an internal collection - that changes from time to time during the coarse of time)</DIV><DIV>&nbsp;</DIV><DIV>Bart</DIV>]]>
   </description>
   <pubDate>Mon, 20 Apr 2009 04:40:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48138&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48138</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon. Dynamic content for xtpControlButtonPopup : Hi, Check DynamicPopups sample....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48118&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48118</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 14074<br /><strong>Posted:</strong> 20 April 2009 at 2:20am<br /><br /><P>Hi,</P><DIV>Check DynamicPopups sample.</DIV>]]>
   </description>
   <pubDate>Mon, 20 Apr 2009 02:20:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48118&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48118</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon. Dynamic content for xtpControlButtonPopup : Hi all,  In my application (3D...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48109&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48109</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5078">Bart6</a><br /><strong>Subject:</strong> 14074<br /><strong>Posted:</strong> 19 April 2009 at 11:39am<br /><br />Hi all,<br /><br />In my application (3D scene editor) i would like to populate the content of xtpControlButtonPopup dynamically  with the available cameras. (the amount of cameras can be determined by the user).<br /><br />In Mainframe I currently create a ribbon group and hardcode the xtpControlButtonPopup:<br /><br /><font face="Courier New, Courier, mono">CXTPRibbonGroup* pSceneCameras = pTabPageScene-&gt;AddGroup(ID_SCENE_CAMERAS);<br />CXTPControl* pCameraPopup = pSceneCameras-&gt;Add(xtpControlButtonPopup, ID_CAMERAS_LIST);<br />pCameraPopup-&gt;SetCaption(TEXT("&lt;name_ of active camera&gt;")); // TODO: do this somewhere at runtime <br />pCameraPopup-&gt;GetCommandBar()-&gt;GetControls()-&gt;Add(new CXTPControlLabel(), ID_CAMERA_ACTIVE);<br />CXTPControl* pCameraItem1 = pCameraPopup-&gt;GetCommandBar()-&gt;GetControls()-&gt;Add(xtpControlButton, ID_CAMERA);<br />pCameraPopup-&gt;GetCommandBar()-&gt;GetControls()-&gt;Add(new CXTPControlLabel(), ID_CAMERA_AVAILABLE);<br />CXTPControl* pCameraItem2 = pCameraPopup-&gt;GetCommandBar()-&gt;GetControls()-&gt;Add(xtpControlButton, ID_CAMERA);<br />CXTPControl* pCameraItem3 = pCameraPopup-&gt;GetCommandBar()-&gt;GetControls()-&gt;Add(xtpControlButton, ID_CAMERA);<br />// separator<br />CXTPControl* pCameraItem4 = pCameraPopup-&gt;GetCommandBar()-&gt;GetControls()-&gt;Add(xtpControlButton, ID_CAMERA_NEW);</font><br /><br />Q: is there an example i can look at that populates the xtpControlButtonPopup at runtime - or if it doesn't, what is the best way to do it.<br /><br />Thanks<br />Bart]]>
   </description>
   <pubDate>Sun, 19 Apr 2009 11:39:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14074&amp;PID=48109&amp;title=ribbon-dynamic-content-for-xtpcontrolbuttonpopup#48109</guid>
  </item> 
 </channel>
</rss>