| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Documentation build overview10 files changed · ± 10 modified ± Modified |
Sorry, something went wrong.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # Doc/library/dialog.rst # Lib/test/test_tkinter/test_simpledialog.py
Add a button per dialog, a checkbox to toggle classic/themed widgets, and show a bitmap, a detail message and Alt-key button accelerators in the SimpleDialog example. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # Doc/whatsnew/3.16.rst
|
Thanks for doing this; IDLE has a few uses. Not much change on Windows but much better on macOS. |
Sorry, something went wrong.
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>
|
Tcl/Tk was upgrade from 9.0 to 9.1 on GitHub Action, and test_idle and test_tkinter started to fail with _tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle" on macOS CI: issue gh-159517. I created PR gh-159518, extracted from this PR, to make a minimum change to repair the CI. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This reworks tkinter.simpledialog to match the look and feel of the native Tk dialogs: SimpleDialog is a port of ::tk_dialog, and Dialog is a base class whose button box is modelled on ::tk::MessageBox.