Problem

Automatically restore focus

Posted 2 months ago by Avatar Miguel A.

Hi, when a toolwindow has got focus and I open a dialog or messagebox in code and the user closes it, the focus is set to the first control in the toolwindow instead of the control which were focused the last. How can I restore focus to the last focused control? Preferrably with one code change only and without having to make changes in all tool window classes instead.

[Modified 2 months ago]


Comments (3)

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA

Hi Miguel,

Are you using Microsoft's Win32 dialogs (like MessageBox, OpenFileDialog, etc.) here? 

Does it happen if you open a WPF-based dialog Window instead?


Actipro Software Support
Posted 2 months ago by Miguel A.

Hi,

i'm using WPF windows only

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA

Hi Miguel,

While we couldn't duplicate the exact issue, we might have found something similar when clicking docking window tabs that we updated our code for.  Can you email our support address a new simple sample project showing the issue you're seeing?  Then we can test our update to see if that resolved it or not.  Please remove any bin/obj folders from the ZIP you send, and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support
Information The latest build of this product (2018.1 build 0673) was released 1 month ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.