I have replace the kw dict with dict.pop and dict.get methods to allow users to override the standard values while keeping the style the same.
I have also conformed the init args to be the same as standard widgets using master, cnf and kw with default values.
This should be a drop in replacement to the OptionMenu.init method.
(FYI i dont know how to do PRs yet and the doc string probably needs editing.)
changed the title [-]tkinter OptionMeny conform to standard widget options,[/-][+]tkinter OptionMenu conform to standard widget options,[/+]on Jan 24, 2023
Activity
serhiy-storchaka commented on Jun 23, 2026
The originally proposed patch is not "a drop-in replacement", it breaks signature.
#151959 adds support of all standard options without breaking.
gh-101284: Allow passing Menubutton options to tkinter.OptionMenu (GH…
pythongh-101284: Allow passing Menubutton options to tkinter.OptionMe…