ajoos

DockableWindow with embedded Toolstrip: ToolStripButtons don't react on first click

Discussion created by ajoos on May 4, 2012
Latest reply on Jan 2, 2015 by tim.sexton
Hey

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:
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)?

However:
* 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)
* The toolstrip buttons do get activated (blue border) even if my previous click was on the map
* Everything works smooth if the Window is docked (not floating)

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.
Anything I did wrong? Do I need to implement some strange WM_-handling/custom message handling?

I'm happy for every hint :-)

Greetings,
Andry

Outcomes