You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tkinter convenience dialogs don't use themed widgets #59396
Some of the tkinter convenience dialogs, e.g., tkinter.filedialog.FileDialog, tkinter.scrolledtext.ScrolledText, tkinter.simpledialog.SimpleDialog, tkinter.simpledialog.Dialog, and tkinter.simpledialog._QueryDialog. Ideally they should use ttk.Frame, ttk.Button, etc. Or if that is risky for compatibility, then couldn't they be copied to tkinter.ttk and the copies themized?
It has been agreed that IDLE could assume tk8.5 (or possibly 8.4 + tile extension) and use themed widgets (though it is not yet) and not run otherwise. Further discussion would be needed to do the same for tkinter, but maybe by 3.4 that might be reasonable.
#151848 updates the implementation of SimpleDialog and Dialog to match the look and feel of ::tk_dialog and ::tk::MessageBox. Both classes got the use_ttk parameter which controls the set of used widgets and their layout. SimpleDialog got also few other features. FileDialog was left for the follow up PR.
SimpleDialog and query dialogs use ttk by default (like most of native Tk dialogs). Dialog uses classic widgets by default, because user's classic widgets in body() look ugly on ttk.Frame. So this was left on user.
The base patch was written in 2020 against 8.6, but I was overloaded and distracted. Then I updated it to 9.0, 9.1, and with help of Claude Code was able to finish it (so the documentation is better than what I usually wrote).
Activity
mark-summerfield commentedon Jun 26, 2012
Some of the tkinter convenience dialogs, e.g., tkinter.filedialog.FileDialog, tkinter.scrolledtext.ScrolledText, tkinter.simpledialog.SimpleDialog, tkinter.simpledialog.Dialog, and tkinter.simpledialog._QueryDialog. Ideally they should use ttk.Frame, ttk.Button, etc. Or if that is risky for compatibility, then couldn't they be copied to tkinter.ttk and the copies themized?
terryjreedy commentedon Jul 1, 2012
It has been agreed that IDLE could assume tk8.5 (or possibly 8.4 + tile extension) and use themed widgets (though it is not yet) and not run otherwise. Further discussion would be needed to do the same for tkinter, but maybe by 3.4 that might be reasonable.
serhiy-storchaka commentedon Jun 21, 2026
#151848 updates the implementation of
SimpleDialogandDialogto match the look and feel of::tk_dialogand::tk::MessageBox. Both classes got theuse_ttkparameter which controls the set of used widgets and their layout.SimpleDialoggot also few other features.FileDialogwas left for the follow up PR.SimpleDialogand query dialogs use ttk by default (like most of native Tk dialogs).Dialoguses classic widgets by default, because user's classic widgets inbody()look ugly on ttk.Frame. So this was left on user.The base patch was written in 2020 against 8.6, but I was overloaded and distracted. Then I updated it to 9.0, 9.1, and with help of Claude Code was able to finish it (so the documentation is better than what I usually wrote).
gh-59396: Modernize tkinter.simpledialog (GH-151848)
pythongh-59396: Tolerate absent tkinter dialog submodules in idlelib.run
gh-59396: Use themed widgets in tkinter.filedialog (GH-152036)
pythongh-59396: Modernize tkinter.simpledialog (pythonGH-151848)
Merge branch 'main' into pythongh-59396-scrolledtext-ttk
gh-59396: Add use_ttk parameter to tkinter ScrolledText (GH-153119)
serhiy-storchaka commentedon Jul 10, 2026
All dialogs and widgets implemented in Python are now themed by default or have an option.