<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DockableWindow with embedded Toolstrip: ToolStripButtons don't react on first click in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683009#M18385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I found a work around to this by using &lt;A href="http://blogs.msdn.com/b/rickbrew/archive/2006/01/09/511003.aspx" rel="nofollow" style="color: #358daa;"&gt;Rick Brewster's suggestions&lt;/A&gt;.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;First, I modified Rick's class by adding a constructor &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;public ToolStripEx() : base() { }&lt;/CODE&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Then in my dockable window's designer class "MyClass.Designer.cs" I changed the toolstrip's declared type from &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;System.Windows.Forms.ToolStrip&lt;/CODE&gt; to &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;ToolStripEx&lt;/CODE&gt;.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Next, in the &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;InitializeComponent()&lt;/CODE&gt; method of the same designer class, I changed the initialization type for the toolstrip the same way from &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;this.MyToolStrip = new System.Windows.Forms.ToolStrip()&lt;/CODE&gt; to &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;this.MyToolStrip = new ToolStripEx()&lt;/CODE&gt;.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Finally, I set &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;this.MyToolStrip.ClickThrough = true;&lt;/CODE&gt; in the default property assignment section in the same designer class.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Now the buttons on the toolstrip fire the onClick event everytime - even when the dockable window is not active!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jan 2015 17:58:17 GMT</pubDate>
    <dc:creator>TimSexton1</dc:creator>
    <dc:date>2015-01-02T17:58:17Z</dc:date>
    <item>
      <title>DockableWindow with embedded Toolstrip: ToolStripButtons don't react on first click</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683006#M18382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my 10.0 SP4 ArcMap application I have a DockableWindow (created using the templates (as UserControl implementing IDockableWindowDef), C#, .Net3.5) that contains a Listbox and a Toolstrip with a few ToolstripButtons. I do encounter a rather strange behaviour with this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the DockWindow is not active (ie. if I click in the map somewhere) and then I'll directly hit one of the ToolstripButtons in my Window, the click method is not being called. I have to click the button again to make it fire. It seems to me, the DockWindow has to be activated first (by the first click)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* If I click an item in the listbox in the same window, it react immediately (no matter if the previous click was on the map)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* The toolstrip buttons do get activated (blue border) even if my previous click was on the map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Everything works smooth if the Window is docked (not floating)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on that? ArcMap itself contains a few windows that look the same (toolbar/toolstrip and a list...) but do not behave this weird.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anything I did wrong? Do I need to implement some strange WM_-handling/custom message handling?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm happy for every hint &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 07:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683006#M18382</guid>
      <dc:creator>AndryJoos</dc:creator>
      <dc:date>2012-05-04T07:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: DockableWindow with embedded Toolstrip: ToolStripButtons don't react on first click</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683007#M18383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3560"&gt;Andry Joos&lt;/A&gt; - I was having the same issue but was able to find a solution.&amp;nbsp; I documented it on GIS Stack Exchange &lt;A href="https://gis.stackexchange.com/questions/126287/toolstrip-button-click-event-is-not-fired-on-first-click/"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 18:17:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683007#M18383</guid>
      <dc:creator>TimSexton1</dc:creator>
      <dc:date>2014-12-11T18:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: DockableWindow with embedded Toolstrip: ToolStripButtons don't react on first click</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683008#M18384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim! Thank you very much for letting me know. It's awesome to read that there actually is a solution. I will check if we still have that problem at the customer's side and implement it that way, if possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you want to copy&amp;amp;paste your solution into GeoNet too, for future reference for other people having the same issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 07:18:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683008#M18384</guid>
      <dc:creator>AndryJoos</dc:creator>
      <dc:date>2014-12-12T07:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: DockableWindow with embedded Toolstrip: ToolStripButtons don't react on first click</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683009#M18385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I found a work around to this by using &lt;A href="http://blogs.msdn.com/b/rickbrew/archive/2006/01/09/511003.aspx" rel="nofollow" style="color: #358daa;"&gt;Rick Brewster's suggestions&lt;/A&gt;.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;First, I modified Rick's class by adding a constructor &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;public ToolStripEx() : base() { }&lt;/CODE&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Then in my dockable window's designer class "MyClass.Designer.cs" I changed the toolstrip's declared type from &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;System.Windows.Forms.ToolStrip&lt;/CODE&gt; to &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;ToolStripEx&lt;/CODE&gt;.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Next, in the &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;InitializeComponent()&lt;/CODE&gt; method of the same designer class, I changed the initialization type for the toolstrip the same way from &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;this.MyToolStrip = new System.Windows.Forms.ToolStrip()&lt;/CODE&gt; to &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;this.MyToolStrip = new ToolStripEx()&lt;/CODE&gt;.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Finally, I set &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222; background-color: #eeeeee;"&gt;this.MyToolStrip.ClickThrough = true;&lt;/CODE&gt; in the default property assignment section in the same designer class.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Now the buttons on the toolstrip fire the onClick event everytime - even when the dockable window is not active!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 17:58:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/dockablewindow-with-embedded-toolstrip/m-p/683009#M18385</guid>
      <dc:creator>TimSexton1</dc:creator>
      <dc:date>2015-01-02T17:58:17Z</dc:date>
    </item>
  </channel>
</rss>

