cpython/Lib/tkinter
Serhiy Storchaka ad38cf8292
gh-59396: Modernize tkinter.simpledialog (GH-151848)
Rework SimpleDialog and Dialog to match the look and feel of the native Tk
dialogs ::tk_dialog and ::tk::MessageBox.

* SimpleDialog is a Python port of ::tk_dialog and Dialog a base class
  modelled on ::tk::MessageBox.  Both adopt the message-box keyboard
  conventions: button accelerators, a default ring that follows the keyboard
  focus, and a <Return> binding that invokes the focused button.
* Both classes gain a use_ttk parameter that selects the classic Tk or the
  themed ttk widgets.  It controls the widget set and the appearance that the
  two procedures style differently, but not the keyboard behaviour.
* Update _place_window with the Tk 9.1 placement refinements.
* The new helpers _temp_grab_focus (a modal grab/focus context manager),
  _underline_ampersand and _find_alt_key_target (ports of the Tk
  accelerator-key procedures) can be reused by other tkinter dialogs, as
  _setup_dialog already is.
* Fix several defects uncovered while comparing with the Tcl sources.
* Improve the simpledialog demo.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 11:01:10 +03:00
..
__init__.py gh-101284: Allow passing Menubutton options to tkinter.OptionMenu (GH-151959) 2026-06-23 06:24:17 +00:00
__main__.py
colorchooser.py
commondialog.py gh-84623: Remove unused imports in stdlib (#93773) 2022-06-13 16:28:41 +02:00
constants.py
dialog.py gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547) 2022-09-27 14:05:05 +03:00
dnd.py
filedialog.py gh-102799: use exception instance instead of sys.exc_info() (#102885) 2023-03-31 11:23:02 +01:00
font.py gh-140481: Improve error message when trying to iterate a Tk widget, image or font (GH-140501) 2025-10-30 13:11:56 +02:00
messagebox.py
scrolledtext.py gh-136839: Refactor simple dict.update calls (#136811) 2025-07-19 10:12:10 -07:00
simpledialog.py gh-59396: Modernize tkinter.simpledialog (GH-151848) 2026-06-23 11:01:10 +03:00
ttk.py gh-151920: Add the ttk.Style.theme_styles() method (GH-151921) 2026-06-22 20:43:43 +03:00