GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-59396: Use themed widgets in tkinter.filedialog by serhiy-storchaka · Pull Request #152036 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The FileDialog, LoadFileDialog and SaveFileDialog dialogs, which follow the layout of the classic Motif file selection dialog, are now built from the themed tkinter.ttk widgets by default instead of the classic tkinter widgets, and gained a use_ttk parameter that selects between the classic Tk widgets and the themed ttk widgets.

They were also brought closer to the native Tk file dialog: the buttons and field labels gained Alt key accelerators, the default ring follows the keyboard focus and the previous focus and grab are restored on close, the Escape key cancels the dialog, the focus traverses the widgets in their visual order, and the directory and file lists gained a horizontal scrollbar and type-ahead selection. The dialog is now transient and centered over its parent, and the SaveFileDialog overwrite confirmation uses a themed message box.

This is the filedialog counterpart of the simpledialog modernization in gh-59396 (#151848); the button and frame metrics follow tk_dialog (classic) and tk::MessageBox (themed), while the body keeps the Motif layout.

The Listbox stays classic in both modes, as ttk has no themed listbox; a Treeview-based list is left as a possible follow-up.

  • Issue: tkinter convenience dialogs don't use themed widgets #59396

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka @claude
pythongh-59396: Use themed widgets in tkinter.filedialog
9fce9ed
The FileDialog, LoadFileDialog and SaveFileDialog dialogs are now built from
the themed tkinter.ttk widgets by default instead of the classic tkinter
widgets, and gained a use_ttk parameter that selects between the classic Tk
widgets and the themed ttk widgets.

They were also brought closer to the native Tk file dialog: the buttons and
field labels gained Alt key accelerators, the default ring follows the keyboard
focus, the Escape key cancels the dialog, the focus traverses the widgets in
their visual order, and the directory and file lists gained a horizontal
scrollbar and type-ahead selection.  The dialog is now transient and centered
over its parent, and the SaveFileDialog overwrite confirmation uses a themed
message box.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@serhiy-storchaka
serhiy-storchaka requested a review from AA-Turner as a code owner June 23, 2026 23:03
@bedevere-app bedevere-app Bot added the awaiting core review label Jun 23, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jun 23, 2026
tkinter convenience dialogs don't use themed widgets #59396
Closed
@read-the-docs-community

read-the-docs-community Bot commented Jun 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33335130 | 📁 Comparing 7a97e4b against main (5e0747d)

  🔍 Preview build  

30 files changed · ± 29 modified · - 1 deleted

± Modified

  • c-api/extension-modules.html
  • c-api/import.html
  • deprecations/index.html
  • deprecations/pending-removal-in-3.16.html
  • deprecations/pending-removal-in-3.17.html
  • deprecations/soft-deprecations.html
  • howto/abi3t-migration.html
  • library/asyncio-eventloop.html
  • library/asyncio-llapi-index.html
  • library/asyncio-runner.html
  • and 19 more...

- Deleted

  • library/asyncio-policy.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka @claude
pythongh-59396: Tolerate absent tkinter dialog submodules in idlelib.run
7a97e4b
filedialog no longer imports tkinter.dialog, so that submodule is not
always present when run.py undoes idlelib's tkinter imports; skip the
ones that are missing instead of raising.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@serhiy-storchaka
serhiy-storchaka requested a review from terryjreedy as a code owner June 27, 2026 08:47
@serhiy-storchaka
serhiy-storchaka merged commit 3d9d6c8 into python:main Jul 5, 2026
51 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Jul 5, 2026
@serhiy-storchaka
serhiy-storchaka deleted the tkinter-filedialog-use-ttk branch July 5, 2026 11:27
@serhiy-storchaka serhiy-storchaka mentioned this pull request Jul 5, 2026
gh-59396: Add use_ttk parameter to tkinter ScrolledText #153119
Merged
This was referenced Sep 4, 2026
[3.15] gh-156896: Stop scrubbing tkinter submodules upon idlelib.run import (GH-156915) #156958
Merged
[3.14] gh-156896: Stop scrubbing tkinter submodules upon idlelib.run import (GH-156915) #156959
Merged
[3.13] gh-156896: Stop scrubbing tkinter submodules upon idlelib.run import (GH-156915) #156960
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@terryjreedy terryjreedy Awaiting requested review from terryjreedy terryjreedy is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.