Windows 7 - dialog boxes spawn behind other windows.
See original GitHub issue(Cross posting from http://stackoverflow.com/questions/31223583/easygui-dialogs-are-not-given-focus-when-created .)
I am using Python 2.7.9, easygui 0.97.4
, and Windows 7.
I am trying to pop up a dialog box using the following:
import easygui
easygui.msgbox()
I would expect a dialog box to pop up and come to the foreground, taking focus. Sometimes, this happens. Other times, the dialog box does not come to the front, and spawns behind all other windows.
Whether the dialog box comes to the front, or hides behind other windows, seems to depend on something unpredictable. Giving different arguments to easygui.msgbox()
doesn’t seem to help. Restarting the Python interpreter sometimes makes it work, and sometimes doesn’t.
The issue is not so bad for simple dialogs, which at least give a flashing button in the task bar to get your attention.
It is worse for diropenbox()
which does not spawn a flashing button in the taskbar. The dialog spawns behind a window and gives no evidence it’s there, until you minimise all other windows.
Is this normal and expected behaviour? I would like easygui
dialogs to always come to the front and always take focus, instead of hiding behind other windows.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
This is still an issue. Windows 10, python 3.10
This is still happening on windows 10.
A hackish workaround if anyone happens to be looking for this: