aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/tkinter
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/__init__.py2
-rw-r--r--Lib/tkinter/ttk.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index 71a265e3532..a693b04870b 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -4199,7 +4199,7 @@ class OptionMenu(Menubutton):
keyword argument command."""
kw = {"borderwidth": 2, "textvariable": variable,
"indicatoron": 1, "relief": RAISED, "anchor": "c",
- "highlightthickness": 2}
+ "highlightthickness": 2, "name": kwargs.pop("name", None)}
Widget.__init__(self, master, "menubutton", kw)
self.widgetName = 'tk_optionMenu'
menu = self.__menu = Menu(self, name="menu", tearoff=0)
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py
index 8ddb7f97e3b..c0cf1e787fa 100644
--- a/Lib/tkinter/ttk.py
+++ b/Lib/tkinter/ttk.py
@@ -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)