<?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 : C&#111;ntrol Butt&#111;n, Property Grid and Focus</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : C&#111;ntrol Butt&#111;n, Property Grid and Focus]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 14:04:11 +0000</pubDate>
  <lastBuildDate>Fri, 25 Mar 2005 02:03: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=2008</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[C&#111;ntrol Butt&#111;n, Property Grid and Focus : it is correct. CommandBars don&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2008&amp;PID=5947&amp;title=control-button-property-grid-and-focus#5947</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2008<br /><strong>Posted:</strong> 25 March 2005 at 2:03am<br /><br /><P>it is correct. CommandBars don't grab focus </P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Fri, 25 Mar 2005 02:03:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2008&amp;PID=5947&amp;title=control-button-property-grid-and-focus#5947</guid>
  </item> 
  <item>
   <title><![CDATA[C&#111;ntrol Butt&#111;n, Property Grid and Focus : When a user types a value into...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2008&amp;PID=5878&amp;title=control-button-property-grid-and-focus#5878</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=280">ianp</a><br /><strong>Subject:</strong> 2008<br /><strong>Posted:</strong> 22 March 2005 at 10:11am<br /><br /><P>When a user types a value into a property grid item, then clicks a control on a commandbar, the propertygrid item value is not updated before the execute event fires. This results in the control returning the old (non visible) value when the PropertyGridItem.Value is accessed.</P><P>However, if the PropertyGridItem.Value is accessed by clicking a command button on the same form, the visible value is returned.</P><P>It seems that the value is only updated when the focus changes from the grid item (as in the case of the command button) and the Commandbar control does not move the focus from the property grid when the execute event fires.</P><P>Is this expected behaviour, or a bug?</P><P>The following code recreates my 'problem'</P><P><table width="99%"><tr><td><pre class="BBcode"><BR>Private Sub Form_Load()<BR>&nbsp; ' Add read button<BR>&nbsp; With Me.CommandBars<BR>&nbsp;&nbsp;&nbsp; .ActiveMenuBar.Controls.Add xtpControlButton, 2, "Read"<BR>&nbsp;&nbsp;&nbsp; .KeyBindings.Add 1, 13, 2<BR>&nbsp; End With<BR>&nbsp; ' Add property grid items<BR>&nbsp; With Me.PropertyGrid<BR>&nbsp;&nbsp;&nbsp; .AddCategory "Criteria"<BR>&nbsp;&nbsp;&nbsp; .Categories(1).Expanded = True<BR>&nbsp;&nbsp;&nbsp; .Categories(1).AddChildItem PropertyItemString, "Test"<BR>&nbsp;&nbsp;&nbsp; .Categories(1).AddChildItem PropertyItemNumber, "Test1"<BR>&nbsp;&nbsp;&nbsp; .Categories(1).AddChildItem PropertyItemEnum, "Test2"<BR>&nbsp;&nbsp;&nbsp; .Categories(1).Childs(3).Constraints.Add "enum 1", 1<BR>&nbsp;&nbsp;&nbsp; .Categories(1).Childs(3).Constraints.Add "enum 2", 2<BR>&nbsp; End With<BR>End Sub<BR>Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)<BR>&nbsp; If Control.Id = 2 Then<BR>&nbsp; ' UNCOMMENT THE FOLLOWING LINE TO ENSURE VISIBLE VALUES ARE READ<BR>&nbsp; '&nbsp; Me.SetFocus<BR>&nbsp;&nbsp;&nbsp; ReadValues<BR>&nbsp; End If<BR>End Sub<BR>Private Sub Command1_Click()<BR>&nbsp; ReadValues<BR>End Sub<BR>Private Sub ReadValues()<BR>&nbsp; For Each child In Me.PropertyGrid.Categories(1).Childs<BR>&nbsp;&nbsp;&nbsp; s = s &amp; vbNewLine &amp; child.Caption &amp; ": " &amp; child.Value<BR>&nbsp; Next<BR>&nbsp; MsgBox s<BR>End Sub<BR></pre></td></tr></table></P>]]>
   </description>
   <pubDate>Tue, 22 Mar 2005 10:11:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2008&amp;PID=5878&amp;title=control-button-property-grid-and-focus#5878</guid>
  </item> 
 </channel>
</rss>