Message383612
Currently, standard message boxes in tkinter.messagebox (like showinfo() or askyesnocancel()) can be called without master or default root window. If arguments master or parent are not specified and there is no default root window is still created, the root window is created and set as the default root window. It is kept visible after closing a message box. It was done for testing from REPL. It affects also tkinter.colorchooser.askcolor().
The drawback is that the root window is kept visible and that it is set as the default root window (so following explicit calls of Tk(), with possible different arguments does not set the default root window).
Simple query dialogs in tkinter (like askinteger()) initially had the same behavior. But later it was broken, and currently they do not work if master and parent are not specified and the default root window is not set.
Proposed PR improves behavior of message boxes and colorchooser and restore the lost feature for query dialogs. Now if master and parent are not specified and the default root window is not set, the new temporary hidden root window is created, but is not set as the default root window. It will be destroyed right after closing the dialog, so it will not affect other widgets. |
|
Date |
User |
Action |
Args |
2020-12-22 20:35:41 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gpolo |
2020-12-22 20:35:40 | serhiy.storchaka | set | messageid: <1608669340.97.0.219315442285.issue42721@roundup.psfhosted.org> |
2020-12-22 20:35:40 | serhiy.storchaka | link | issue42721 messages |
2020-12-22 20:35:40 | serhiy.storchaka | create | |
|