<?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 : Popup menu and treeview c&#111;ntrol</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Popup menu and treeview c&#111;ntrol]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 02:38:50 +0000</pubDate>
  <lastBuildDate>Sun, 12 Feb 2006 19:44: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=3643</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[Popup menu and treeview c&#111;ntrol : Hi all, I have a VB UserControl...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3643&amp;PID=10938&amp;title=popup-menu-and-treeview-control#10938</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1785">KevinC71</a><br /><strong>Subject:</strong> 3643<br /><strong>Posted:</strong> 12 February 2006 at 7:44pm<br /><br /><P>Hi all,</P><P>I have a VB UserControl that contains a CommandBars and Shortcut Bar control as well as a TreeView control.&nbsp; The TreeView control has been embedded into the Shortcut bar client area:</P><P>Set oItem = ShortcutBar1.AddItem(m_lTabID, strTabName, TreeView1.hWnd)</P><P>In the MouseUp event for the TreeView control I have the following code to create and show a popup menu:</P><P>&nbsp;&nbsp;&nbsp; Dim oPopup As CommandBar<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Set oPopup = CommandBars.Add("Popup", xtpBarPopup)<BR>&nbsp;&nbsp;&nbsp; With oPopup.Controls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Add xtpControlButton, 100, "&amp;Open"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Add xtpControlButton, 101, "&amp;New"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Add xtpControlButton, 102, "&amp;Delete"<BR>&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp; oPopup.ShowPopup<BR>&nbsp;&nbsp;&nbsp; </P><P>The popup displays and works fine but the problem is when you use the up/down arrow keys.&nbsp; Focus is changing on the popup menu, which it&nbsp;correct, but&nbsp;focus is also being changed in the TreeView control.&nbsp;&nbsp;Pressing the up/down arrows keys with an open popup menu should not cause the TreeView&nbsp;to change the current selection.</P><P>Any ideas how to prevent this unwanted behavior?</P><P>Thanks,</P><P>Kevin</P>]]>
   </description>
   <pubDate>Sun, 12 Feb 2006 19:44:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3643&amp;PID=10938&amp;title=popup-menu-and-treeview-control#10938</guid>
  </item> 
 </channel>
</rss>