[Tkinter-discuss] Dialog as transient above current toplevel
Vasilis Vlachoudis
Vasilis.Vlachoudis at cern.ch
Wed Aug 24 09:01:01 EDT 2016
Dear all,
in my program I want to provide a more understandable text in the simple dialogs for exiting the
program if there is modified buffer and some other messages.
Instead of creating one dialog for each I use the tkinter dialog Dialog.py like
import Dialog
...
ans = Dialog.Dialog(self.winfo_toplevel(),
{"title":"Multiple Plot",
"text":"Continue with the next\nOr do all plots",
"bitmap": Dialog.DIALOG_ICON,
"default": 0,
"strings": ("Next","All","Cancel")})
if ans.num==1:
doall = True
elif ans.num==2:
break
However the displayed dialog is centred over the desktop and not above
the running application, which is rather confusing.
Is there a way to center it over my toplevel window?
Thanks in advance
Vasilis
More information about the Tkinter-discuss
mailing list