Skip to content

gh-59396: Add use_ttk parameter to tkinter ScrolledText#153119

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-59396-scrolledtext-ttk
Open

gh-59396: Add use_ttk parameter to tkinter ScrolledText#153119
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-59396-scrolledtext-ttk

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Following the themed-widget work for the tkinter dialogs (simpledialog in #151848, filedialog in #152036), tkinter.scrolledtext.ScrolledText gained a keyword-only use_ttk parameter to build the surrounding frame and the vertical scroll bar from the themed tkinter.ttk widgets instead of the classic tkinter widgets.

The classic widgets remain the default for now: ScrolledText.frame and ScrolledText.vbar are documented public attributes, and classic-only scroll bar options (e.g. troughcolor, width) would not apply to a ttk.Scrollbar. use_ttk=True opts into the themed widgets.

The text widget itself stays the classic Text, as tkinter.ttk has no themed counterpart.

ScrolledText gained a keyword-only use_ttk parameter to build the
surrounding frame and the vertical scroll bar from the themed
tkinter.ttk widgets instead of the classic tkinter widgets.  The
classic widgets remain the default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33446487 | 📁 Comparing f401cff against main (3d9d6c8)

  🔍 Preview build  

3 files changed
± library/tkinter.scrolledtext.html
± whatsnew/3.16.html
± whatsnew/changelog.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant