AnsweredAssumed Answered

Addin combobox not releasing focus

Question asked by geonetadmin on Sep 4, 2012
Latest reply on Sep 4, 2012 by geonetadmin
Original User: kjweaver

In ArcMap 10, I have an addin combobox on a tool bar. Once the user selects an option from the combobox, a Windows form opens to enable them to enter some information based on their selection.

However, the focus does not shift to the Windows form but stays on the combobox.  I've tried using both .Show() and .ShowDialog() to display the form.  .Show() allows the combobox drop-down to close but the focus remains on the combobox control.  I've also tried forcing the focus to the Windows form in the tool's OnSelChange event and in the form's Load/Activate/Shown events.

My question is: how do I signal to the addin combobox control that it should complete and release focus?  If this were a traditional ITool combobox, I would use the esriSystemUI.ICompletionNotify technique to send a completed message.  The addin combobox seems to have very few Methods/Events available.

How do I release the tool so I can reset the focus to the Windows form (or anywhere else)?