mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-130482: Add ability to specify name for tkinter.OptionMenu and tkinter.ttk.OptionMenu (GH-130502)
This commit is contained in:
parent
1e9cc3d502
commit
e490c00dac
6 changed files with 19 additions and 2 deletions
|
@ -1603,7 +1603,8 @@ class OptionMenu(Menubutton):
|
|||
A callback that will be invoked after selecting an item.
|
||||
"""
|
||||
kw = {'textvariable': variable, 'style': kwargs.pop('style', None),
|
||||
'direction': kwargs.pop('direction', None)}
|
||||
'direction': kwargs.pop('direction', None),
|
||||
'name': kwargs.pop('name', None)}
|
||||
Menubutton.__init__(self, master, **kw)
|
||||
self['menu'] = tkinter.Menu(self, tearoff=False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue