<?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 : CommandBarButton Width</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CommandBarButton Width]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 19:29:23 +0000</pubDate>
  <lastBuildDate>Wed, 27 Jun 2007 16:08:41 +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=7458</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[CommandBarButton Width : Very interesting.  So I have to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23995&amp;title=commandbarbutton-width#23995</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1446">apuhjee</a><br /><strong>Subject:</strong> 7458<br /><strong>Posted:</strong> 27 June 2007 at 4:08pm<br /><br />Very interesting.  So I have to display it to the user first - then change its visual appearance.  <img src="http://forum.codejock.com/smileys/smiley35.gif" border="0" align="middle"> ]]>
   </description>
   <pubDate>Wed, 27 Jun 2007 16:08:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23995&amp;title=commandbarbutton-width#23995</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBarButton Width : Hi, Before it become visible...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23979&amp;title=commandbarbutton-width#23979</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7458<br /><strong>Posted:</strong> 27 June 2007 at 4:05am<br /><br />Hi,<DIV>Before it become visible Width will be 0. you can set Width parameter to some predefined value.</DIV>]]>
   </description>
   <pubDate>Wed, 27 Jun 2007 04:05:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23979&amp;title=commandbarbutton-width#23979</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBarButton Width : While we&amp;#039;re on the topic...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23977&amp;title=commandbarbutton-width#23977</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1446">apuhjee</a><br /><strong>Subject:</strong> 7458<br /><strong>Posted:</strong> 27 June 2007 at 2:21am<br /><br />While we're on the topic (sort of...), it would be extremely awesome if you guys would make a true state button rather than require the use of&nbsp;the Checked property. <DIV>&nbsp;</DIV><DIV>It may not have been a problem in the past, but with the animation in the Ribbon Bar, the short time between the user click and setting the Button.Checked property looks a little strange.</DIV><DIV>&nbsp;</DIV><DIV>But I'm a perfectionist. &nbsp;<img src="http://forum.codejock.com/smileys/smiley20.gif" border="0"></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 27 Jun 2007 02:21:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23977&amp;title=commandbarbutton-width#23977</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBarButton Width : This is what it looks like by...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23976&amp;title=commandbarbutton-width#23976</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1446">apuhjee</a><br /><strong>Subject:</strong> 7458<br /><strong>Posted:</strong> 27 June 2007 at 2:08am<br /><br /><DIV>This is what it looks like by default:</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/uploads/20070627_020315_bad.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>This is what I'm going for:</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/uploads/20070627_020341_good.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Notice the watch value:</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/uploads/20070627_021455_zero_width.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>And here is the code I'm using.&nbsp;&nbsp; <strong>Note: </strong>it looks ok if I uncomment the explicit width values of 60... but I'd rather not assume that the font metrics will always be the same as they are on my dev machine <img src="http://forum.codejock.com/smileys/smiley4.gif" border="0"></DIV><DIV>&nbsp;</DIV><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">private</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">void</SPAN> ConfigureViewTag()<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">RibbonTab</SPAN> tabView = AddTab(<SPAN style="COLOR: #2b91af">ID</SPAN>.ID_TAB_VIEW, <SPAN style="COLOR: #a31515">"View"</SPAN>);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">RibbonGroup</SPAN> groupPanes = AddGroup(tabView.Id, <SPAN style="COLOR: #2b91af">ID</SPAN>.ID_GROUP_PANES, <SPAN style="COLOR: #a31515">"Panes"</SPAN>, <SPAN style="COLOR: blue">false</SPAN>, <SPAN style="COLOR: blue">null</SPAN>);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>viewObjectExplorerPane = AddControl(groupPanes.Id, <SPAN style="COLOR: #a31515">"VIEW_OBJECT_EXPLORER_PANE"</SPAN>, <SPAN style="COLOR: #2b91af">XTPControlType</SPAN>.xtpControlButton, <SPAN style="COLOR: #a31515">"Object Explorer"</SPAN>, <SPAN style="COLOR: #a31515">"Show/Hide the Object Explorer Pane"</SPAN>, <SPAN style="COLOR: #a31515">"ToggleObjectExplorerPaneAction"</SPAN>);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>CommandBars.Icons.LoadIcon(<SPAN style="COLOR: #2b91af">Path</SPAN>.Combine(<SPAN style="COLOR: #2b91af">ResourceManager</SPAN>.ResourcePath, <SPAN style="COLOR: #a31515">"object_explorer.ico"</SPAN>), viewObjectExplorerPane.Id, XtremeCommandBars.<SPAN style="COLOR: #2b91af">XTPImageState</SPAN>.xtpImageNormal);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>viewPropertiesPane = AddControl(groupPanes.Id, <SPAN style="COLOR: #a31515">"VIEW_PROPERTIES_PANE"</SPAN>, <SPAN style="COLOR: #2b91af">XTPControlType</SPAN>.xtpControlButton, <SPAN style="COLOR: #a31515">"Properties"</SPAN>, <SPAN style="COLOR: #a31515">"Show/Hide the Properties Pane"</SPAN>, <SPAN style="COLOR: #a31515">"TogglePropertiesPaneAction"</SPAN>);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>CommandBars.Icons.LoadIcon(<SPAN style="COLOR: #2b91af">Path</SPAN>.Combine(<SPAN style="COLOR: #2b91af">ResourceManager</SPAN>.ResourcePath, <SPAN style="COLOR: #a31515">"properties.ico"</SPAN>), viewPropertiesPane.Id, XtremeCommandBars.<SPAN style="COLOR: #2b91af">XTPImageState</SPAN>.xtpImageNormal);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>viewCalendarPane = AddControl(groupPanes.Id, <SPAN style="COLOR: #a31515">"VIEW_CALENDAR_PANE"</SPAN>, <SPAN style="COLOR: #2b91af">XTPControlType</SPAN>.xtpControlButton, <SPAN style="COLOR: #a31515">"Calendar"</SPAN>, <SPAN style="COLOR: #a31515">"Show/Hide the Calendar Pane"</SPAN>, <SPAN style="COLOR: #a31515">"ToggleCalendarPaneAction"</SPAN>);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>CommandBars.Icons.LoadIcon(<SPAN style="COLOR: #2b91af">Path</SPAN>.Combine(<SPAN style="COLOR: #2b91af">ResourceManager</SPAN>.ResourcePath, <SPAN style="COLOR: #a31515">"calendar.ico"</SPAN>), viewCalendarPane.Id, XtremeCommandBars.<SPAN style="COLOR: #2b91af">XTPImageState</SPAN>.xtpImageNormal);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>SetEqualButtonWidth(groupPanes);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//viewObjectExplorerPane.Width = 60;<O:P></O:P></SPAN></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//viewPropertiesPane.Width = 60;<O:P></O:P></SPAN></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//viewCalendarPane.Width = 60;<O:P></O:P></SPAN></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">public</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">void</SPAN> SetEqualButtonWidth(<SPAN style="COLOR: #2b91af">RibbonGroup</SPAN> group)<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> maxWidth = 0;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: #2b91af">CommandBarControl</SPAN> control <SPAN style="COLOR: blue">in</SPAN> group)<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (control.Width &gt; maxWidth)<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>maxWidth = control.Width;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: #2b91af">CommandBarControl</SPAN> control <SPAN style="COLOR: blue">in</SPAN> group)<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>control.Width = maxWidth;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">public</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: #2b91af">CommandBarControl</SPAN> AddControl(<SPAN style="COLOR: blue">int</SPAN> groupId, <SPAN style="COLOR: blue">string</SPAN> resourceName, <SPAN style="COLOR: #2b91af">XTPControlType</SPAN> controlType, <SPAN style="COLOR: blue">string</SPAN> controlCaption, <SPAN style="COLOR: blue">string</SPAN> controlDescription, <SPAN style="COLOR: blue">string</SPAN> actionMethod)<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">RibbonGroup</SPAN> group = RibbonBar.FindGroup(groupId);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> resourceId = <SPAN style="COLOR: #2b91af">ResourceManager</SPAN>.AddResource(resourceName);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">CommandBarControl</SPAN> control = group.Add(controlType, resourceId, controlCaption, <SPAN style="COLOR: blue">false</SPAN>, <SPAN style="COLOR: blue">false</SPAN>);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>control.Action.Tag = actionMethod;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>CommandBars.Actions.Add(resourceId, controlCaption, controlCaption, controlDescription, group.Caption);<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> control;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 10pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman">&nbsp;<O:P></O:P></FONT></FONT></P><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 27 Jun 2007 02:08:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23976&amp;title=commandbarbutton-width#23976</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBarButton Width : Hi, Show code you tried. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23972&amp;title=commandbarbutton-width#23972</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7458<br /><strong>Posted:</strong> 27 June 2007 at 12:48am<br /><br /><P>Hi,</P><DIV>Show code you tried.</DIV>]]>
   </description>
   <pubDate>Wed, 27 Jun 2007 00:48:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23972&amp;title=commandbarbutton-width#23972</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBarButton Width : At what point is the Width of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23964&amp;title=commandbarbutton-width#23964</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1446">apuhjee</a><br /><strong>Subject:</strong> 7458<br /><strong>Posted:</strong> 26 June 2007 at 5:25pm<br /><br />At what point is the Width of a RibbonBar button known?&nbsp; I'm trying to add three "state" buttons and set them all to be the same size as the widest... but the width = 0&nbsp;immediately after they have been added to a group.<DIV>&nbsp;</DIV><DIV>Thanks ~ jp</DIV>]]>
   </description>
   <pubDate>Tue, 26 Jun 2007 17:25:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7458&amp;PID=23964&amp;title=commandbarbutton-width#23964</guid>
  </item> 
 </channel>
</rss>