<?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 : RibbonBar - problem to find parent control</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : RibbonBar - problem to find parent control]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 20:26:40 +0000</pubDate>
  <lastBuildDate>Thu, 05 Nov 2009 12:38:53 +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=15552</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[RibbonBar - problem to find parent control : Hi,  You need &amp;#034;ctrl.CommandBar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54595&amp;title=ribbonbar-problem-to-find-parent-control#54595</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 15552<br /><strong>Posted:</strong> 05 November 2009 at 12:38pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>You need "<FONT size=1>ctrl.CommandBar " instead of ctrl.Parent.</DIV><DIV></DIV><DIV></DIV>but I &#1077;&#1088;&#1096;&#1090;&#1083; better to change code for Update architecture like our samples do - user can copy this control to Quick access and you will have 2 instances for same Id.</FONT>]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 12:38:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54595&amp;title=ribbonbar-problem-to-find-parent-control#54595</guid>
  </item> 
  <item>
   <title><![CDATA[RibbonBar - problem to find parent control :  Sorry, I was confused by your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54593&amp;title=ribbonbar-problem-to-find-parent-control#54593</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4225">chrisABC</a><br /><strong>Subject:</strong> 15552<br /><strong>Posted:</strong> 05 November 2009 at 11:54am<br /><br />Sorry, I was confused by your C sample code. <br><br>I only speak Visual Basic :-)<br><br><br><br>There is a Section of the Forum for C++, with a sub Forum Command Bars.&nbsp;&nbsp; Maybe you would get better answer in there.<br>]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 11:54:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54593&amp;title=ribbonbar-problem-to-find-parent-control#54593</guid>
  </item> 
  <item>
   <title><![CDATA[RibbonBar - problem to find parent control : I&amp;#039;m using the ActiveX version......]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54591&amp;title=ribbonbar-problem-to-find-parent-control#54591</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4998">iamgtd</a><br /><strong>Subject:</strong> 15552<br /><strong>Posted:</strong> 05 November 2009 at 11:43am<br /><br />I'm using the ActiveX version...]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 11:43:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54591&amp;title=ribbonbar-problem-to-find-parent-control#54591</guid>
  </item> 
  <item>
   <title><![CDATA[RibbonBar - problem to find parent control : This section of the Forum is for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54590&amp;title=ribbonbar-problem-to-find-parent-control#54590</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4225">chrisABC</a><br /><strong>Subject:</strong> 15552<br /><strong>Posted:</strong> 05 November 2009 at 11:38am<br /><br />This section of the Forum is for ActiveX components. You should get better answers if you post the question in the Section for C# code.]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 11:38:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54590&amp;title=ribbonbar-problem-to-find-parent-control#54590</guid>
  </item> 
  <item>
   <title><![CDATA[RibbonBar - problem to find parent control : I&amp;#039;m using in a Ribbonbar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54582&amp;title=ribbonbar-problem-to-find-parent-control#54582</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4998">iamgtd</a><br /><strong>Subject:</strong> 15552<br /><strong>Posted:</strong> 05 November 2009 at 9:44am<br /><br /><P>I'm using in a Ribbonbar SplitPopupControls. At the runtime controls are enabled and disabled in dependency of the state of the program. So it could be situation that all child controls of a&nbsp;SplitPopupControl are disabled. In this case I want to disable also the SplitPopupControl itself and vize versa. </P><DIV>Please see the following function for enabling or disabling a CommandBarControl. </DIV><DIV>&nbsp;</DIV><DIV>The Enabled state of the control is changed and also it's checked if the control is placed in a SplitPopupControl. If yes, then all child controls of the SplitPopupControl are checked for their enabled-property. This is working, my problem is to set the Enabled property of the SplitPopupControl.<BR></DIV><DIV>Please help me.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;<FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void EnableCommandControl(int commandid, bool enablecommand)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Find control<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XtremeCommandBars.CommandBarControl ctrl = RibbonBar().FindControl(null, commandid, null, true);</FONT></DIV><DIV><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ctrl != null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Enable/disable control<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ctrl.Enabled = enablecommand;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ctrl.Parent.Type.ToString() == "xtpBarTypePopup")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ctrl is child of a popup</FONT></DIV><DIV><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XtremeCommandBars.CommandBar parentctrl = (XtremeCommandBars.CommandBar)ctrl.Parent; // <FONT color=#ff0000>&lt;--- works, but&nbsp;I'm&nbsp;thinking this isn't the&nbsp;correct approach<BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#ff0000> //XtremeCommandBars.CommandBarControl parentctrl = (XtremeCommandBars.CommandBarControl)ctrl.Parent; // &lt;--- fails, but&nbsp;this would be better because CommandBarControl has an Enabled property.</FONT></FONT></DIV><DIV><BR><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (parentctrl != null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool isenabled = false;</FONT></DIV><DIV><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (XtremeCommandBars.CommandBarControl childctrl in parentctrl.Controls)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // here I want to change the Enabled property of SplitPopupControl, but it fails.</FONT></DIV><DIV><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#ff0000>parentctrl.Enabled = isenabled; // &lt;---- doesn't work, because the CommandBar hasn't the property "Enabled"<BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR></FONT></DIV>]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 09:44:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15552&amp;PID=54582&amp;title=ribbonbar-problem-to-find-parent-control#54582</guid>
  </item> 
 </channel>
</rss>