FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-101284: Allow passing Menubutton options to tkinter.OptionMenu by serhiy-storchaka · Pull Request #151959 · python/cpython · GitHub

Repository navigation

gh-101284: Allow passing Menubutton options to tkinter.OptionMenu - #151959

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-optionmenu-options
Jun 23, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-optionmenu-options

Conversation

Copy link
Copy Markdown
Member

tkinter.OptionMenu now forwards arbitrary keyword arguments to the underlying Menubutton instead of rejecting all but command and name.
They can also override OptionMenu's default appearance options (borderwidth, relief, anchor, etc.), whose values are otherwise kept.

The positional variable/value/*values API is unchanged, so this is backward compatible.
Unknown options are now reported by Tk itself (unknown option "-spam") rather than by a hand-rolled message.

Arbitrary keyword arguments are now forwarded to the underlying
Menubutton and can override OptionMenu's default appearance options.
The positional API is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33263197 | 📁 Comparing 575a0fe against main (3f09a17)

  🔍 Preview build  

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

serhiy-storchaka enabled auto-merge (squash) June 23, 2026 06:11
serhiy-storchaka merged commit 868d9a8 into python:main Jun 23, 2026
95 of 97 checks passed
serhiy-storchaka deleted the tkinter-optionmenu-options branch July 1, 2026 16:47
pyctrl pushed a commit to pyctrl/cpython that referenced this pull request Jul 5, 2026
…nu (pythonGH-151959)

Arbitrary keyword arguments are now forwarded to the underlying
Menubutton and can override OptionMenu's default appearance options.
The positional API is unchanged.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL