aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/tkinter/__init__.py
diff options
context:
space:
mode:
authorZhikang Yan <2951256653@qq.com>2025-05-02 19:38:50 +0800
committerGitHub <noreply@github.com>2025-05-02 14:38:50 +0300
commite490c00dac16d458bb66ad157fda2edd0a2d0a14 (patch)
treea98e0adb19341bd0abf7ebd41ce492f8ac207fdf /Lib/tkinter/__init__.py
parent1e9cc3d502773d2dd3b420ecf5b949d902e010c3 (diff)
downloadcpython-e490c00dac16d458bb66ad157fda2edd0a2d0a14.tar.gz
cpython-e490c00dac16d458bb66ad157fda2edd0a2d0a14.zip
gh-130482: Add ability to specify name for tkinter.OptionMenu and tkinter.ttk.OptionMenu (GH-130502)
Diffstat (limited to 'Lib/tkinter/__init__.py')
-rw-r--r--Lib/tkinter/__init__.py2
1 files changed, 1 insertions, 1 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)