<?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 : Trouble with xtpControlRadioButton</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Trouble with xtpControlRadioButton]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 04:23:12 +0000</pubDate>
  <lastBuildDate>Tue, 11 Dec 2007 20:11:51 +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=8356</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[Trouble with xtpControlRadioButton : What you guys mentioned is really...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29363&amp;title=trouble-with-xtpcontrolradiobutton#29363</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3128">Bernie</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 11 December 2007 at 8:11pm<br /><br />What you guys mentioned is really difficult for me to understand but I think the posts will shed light on some questions to the use of CommandBar.<DIV>&nbsp;</DIV><DIV>I have never attened any programming training course. I learn on my own. Actually, I am not a programmer but an&nbsp;IELTS teacher and a planning manager for a language center. <strong>&lt;Oleg, does this surprise you?&gt;<img src="https://forum.codejock.com/smileys/smiley9.gif" border="0"></strong> (sorry for my mistakes in English in any posts!) I don't understand "FORMAL METHODS" of programming. However, with efforts,&nbsp;several programs for several business uses&nbsp;have been published by me.</DIV><DIV>&nbsp;</DIV><DIV>It's sometimes not easy to find the way of the Codejoke controls but I personally think the controls are the greatest solution on earth.</DIV>]]>
   </description>
   <pubDate>Tue, 11 Dec 2007 20:11:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29363&amp;title=trouble-with-xtpcontrolradiobutton#29363</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : Thanks, good description.   Bernie...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29353&amp;title=trouble-with-xtpcontrolradiobutton#29353</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 11 December 2007 at 3:58pm<br /><br />Thanks, good description. <DIV>&nbsp;</DIV><DIV>Bernie - I don't like FindControl because if you have Customization enabled, your user can just remove this control and your code will fail.</DIV><DIV>its ok if you you don't allow change your menus. </DIV><DIV>but Actions and update handler &nbsp;is universal solution - you don't have to think how much controls with this ID you have.</DIV>]]>
   </description>
   <pubDate>Tue, 11 Dec 2007 15:58:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29353&amp;title=trouble-with-xtpcontrolradiobutton#29353</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : Absolutely cracking info ijwelch...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29341&amp;title=trouble-with-xtpcontrolradiobutton#29341</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3529">XpatTech</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 11 December 2007 at 11:41am<br /><br />Absolutely cracking info <a href="member_profile.asp?PF=2113&amp;FID=24" target="_blank">ijwelch</a> , someone just turned the light on in that tunnel up ahead .&nbsp;<img src="http://forum.codejock.com/smileys/smiley20.gif" border="0" align="absmiddle">]]>
   </description>
   <pubDate>Tue, 11 Dec 2007 11:41:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29341&amp;title=trouble-with-xtpcontrolradiobutton#29341</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : If only the help file contained...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29340&amp;title=trouble-with-xtpcontrolradiobutton#29340</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2113">ijwelch</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 11 December 2007 at 11:20am<br /><br />If only the help file contained info like that this forum would be dead&nbsp;<img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" align="absmiddle">]]>
   </description>
   <pubDate>Tue, 11 Dec 2007 11:20:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29340&amp;title=trouble-with-xtpcontrolradiobutton#29340</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton :  Hi Bernie,I&amp;#039;ll butt-in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29338&amp;title=trouble-with-xtpcontrolradiobutton#29338</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2113">ijwelch</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 11 December 2007 at 10:58am<br /><br />Hi Bernie,<br><br>I'll butt-in if it's ok:) I don't think Oleg meant it was YOUR bad use. It's just not the way CommandBars works best.<br><br>I also used to use FindControl for this kind of thing. It's logical.<br><br>Using FindControl is probably a 'fix' they've added for people like you and me, but it is flawed and totally unnecessary once you shift to one of the 2 alternative ways of updating control properties.<br><br>I'll explain for anyone browsing what it took me a while to 'get':<br><br>One problem is when the user has customized bars and the control appears in multiple places. Using FindControl for EVERY CommandBar&nbsp; for each Control you want to update, is a pain. The 'Actions' object was added, I believe, to address this.<br><br>So, the two options for updating CommabdBarControl properties are:<br><br>1. CommandBars.EnableActions and add an Action object for each control you want to update. This way you can call <font color="#006600">CommandBars.Actions(CONTROL_ID).Checked=False <font color="#000000">at any time and all instances of the specified control id will be updated.<br><br>2. Use the CommandBars_Update event. </font></font>There's a bit of a logic shift involved (at least for me) with the Update event. You need to let the <strike>condition</strike> property dictate the state of the control, not the other way around. eg.<br><br>in Update Event (which fires multiple times a second)<br><font color="#006600">Control.Checked=(TextBox1.Text="OK")</font><br><br>in Execute Event<br><font color="#006600">If TextBox1.Text="OK" then<br>&nbsp;&nbsp;&nbsp; TextBox1.Text="Not OK"<br>Else<br>&nbsp;&nbsp;&nbsp; TextBox1.Text="OK<br>End If</font><br><br><br>Actions are useful when updating a controls' property could take time. The Update event occurs regularly so use Actions when the property is not guaranteed to be instantly accessible. Then (for example when the user chooses to 'Refresh') you can set the Actions(CONTROL_ID).WhateverProperty=Value<br><br>]]>
   </description>
   <pubDate>Tue, 11 Dec 2007 10:58:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29338&amp;title=trouble-with-xtpcontrolradiobutton#29338</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : Oleg, can you explain why it&amp;#039;s...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29331&amp;title=trouble-with-xtpcontrolradiobutton#29331</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3128">Bernie</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 11 December 2007 at 8:16am<br /><br />Oleg, can you explain why it's a VERY BAD use?]]>
   </description>
   <pubDate>Tue, 11 Dec 2007 08:16:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29331&amp;title=trouble-with-xtpcontrolradiobutton#29331</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : Hi, Almost all samples with theme...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29287&amp;title=trouble-with-xtpcontrolradiobutton#29287</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 09 December 2007 at 4:21am<br /><br /><P>Hi,</P><DIV>Almost all samples with theme buttons. For example CommandBars\VB\MDISample </DIV>]]>
   </description>
   <pubDate>Sun, 09 Dec 2007 04:21:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29287&amp;title=trouble-with-xtpcontrolradiobutton#29287</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : Which sample ?  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29277&amp;title=trouble-with-xtpcontrolradiobutton#29277</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3529">XpatTech</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 08 December 2007 at 8:20pm<br /><br />Which sample ?]]>
   </description>
   <pubDate>Sat, 08 Dec 2007 20:20:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=29277&amp;title=trouble-with-xtpcontrolradiobutton#29277</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : Hi, Its VERY bad design to use...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=27129&amp;title=trouble-with-xtpcontrolradiobutton#27129</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 09 October 2007 at 3:09pm<br /><br /><DIV>Hi,</DIV><DIV>Its VERY bad design to use FindControl for such operation</DIV><DIV>&nbsp;</DIV><DIV>Check how we use Update handlers in our sample. Check how we Check only one Visual theme button&nbsp;. Add Variable that indicates last selected Control and Update these Controls in Update handler.</DIV>]]>
   </description>
   <pubDate>Tue, 09 Oct 2007 15:09:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=27129&amp;title=trouble-with-xtpcontrolradiobutton#27129</guid>
  </item> 
  <item>
   <title><![CDATA[Trouble with xtpControlRadioButton : Howdy,  I&amp;#039;m trying to implement...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=27103&amp;title=trouble-with-xtpcontrolradiobutton#27103</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3367">clubside</a><br /><strong>Subject:</strong> 8356<br /><strong>Posted:</strong> 09 October 2007 at 5:32am<br /><br />Howdy,<DIV>&nbsp;</DIV><DIV>I'm trying to implement a RadioControl list in a pop-up menu (the sad fact is that I can implement it fine as a ComboBox in the Ribbon, but its companion object, which I implemented as a pop-up Treeview, would not render properly and there is no companion Event to InitCommandsPopup so I had to switch to doing it on a menu) but since CommandBars will not manage the state itself I'm trying to unsuccessfully. All I'm trying to do it make the items works like a radio control, so only the newly selected item is "checked", but FindControl is failing.</DIV><DIV>&nbsp;</DIV><DIV>Here is how the menu is built:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; Set ControlPopup = ControlOptions.CommandBar.Controls.Add(xtpControlPopup, ID_SVR_SOURCE, "Source Server", -1, False)<BR>&nbsp;&nbsp;&nbsp; Set Control = ControlPopup.CommandBar.Controls.Add(xtpControlRadioButton, ID_SVR_SOURCE_CONTENT, "Content Editor", -1, False)<BR>&nbsp;&nbsp;&nbsp; Control.Checked = True<BR>&nbsp;&nbsp;&nbsp; Set Control = ControlPopup.CommandBar.Controls.Add(xtpControlRadioButton, ID_SVR_SOURCE_NS1, "NS1", -1, False)<BR>&nbsp;&nbsp;&nbsp; Control.BeginGroup = True<BR>&nbsp;&nbsp;&nbsp; ControlPopup.CommandBar.Controls.Add xtpControlRadioButton, ID_SVR_SOURCE_TESTPAK, "TestPak", -1, False<BR>&nbsp;&nbsp;&nbsp; ControlPopup.CommandBar.Controls.Add xtpControlRadioButton, ID_SVR_SOURCE_TRYSTARS, "TryStars", -1, False<BR>&nbsp;&nbsp;&nbsp; ControlPopup.CommandBar.Controls.Add xtpControlRadioButton, ID_SVR_SOURCE_SUPPORT, "Support", -1, False<BR></DIV><DIV>Here is the code inside the Execute event:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case ID_SVR_SOURCE_CONTENT, ID_SVR_SOURCE_NS1, ID_SVR_SOURCE_TESTPAK, ID_SVR_SOURCE_TRYSTARS, ID_SVR_SOURCE_SUPPORT<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set FoundControl = CommandBars.FindControl(, ID_SVR_SOURCE_CONTENT)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not FoundControl Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundControl.Checked = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set FoundControl = CommandBars.FindControl(, ID_SVR_SOURCE_NS1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not FoundControl Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundControl.Checked = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set FoundControl = CommandBars.FindControl(, ID_SVR_SOURCE_TESTPAK)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not FoundControl Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundControl.Checked = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set FoundControl = CommandBars.FindControl(, ID_SVR_SOURCE_TRYSTARS)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not FoundControl Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundControl.Checked = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set FoundControl = CommandBars.FindControl(, ID_SVR_SOURCE_SUPPORT)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not FoundControl Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundControl.Checked = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.Checked = True<BR></DIV><DIV>However the control is never found. I use this same code to find a CheckBox item on the ribbon to activate/deactivate an associated control:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case ID_CW_STARTDATE_CAPTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.Checked = Not Control.Checked<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set FoundControl = CommandBars.FindControl(, ID_CW_STARTDATE)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not FoundControl Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundControl.Enabled = Not FoundControl.Enabled<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR></DIV><DIV>Anyone know what is going on or a better way to control the active Radio selection?</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 09 Oct 2007 05:32:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8356&amp;PID=27103&amp;title=trouble-with-xtpcontrolradiobutton#27103</guid>
  </item> 
 </channel>
</rss>