mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-25684: ttk.OptionMenu radiobuttons weren't unique (#2276)
between instances of OptionMenu.
This commit is contained in:
parent
e8eb17b2c1
commit
a568e52733
3 changed files with 29 additions and 1 deletions
|
|
@ -1635,7 +1635,8 @@ class OptionMenu(Menubutton):
|
|||
menu.delete(0, 'end')
|
||||
for val in values:
|
||||
menu.add_radiobutton(label=val,
|
||||
command=tkinter._setit(self._variable, val, self._callback))
|
||||
command=tkinter._setit(self._variable, val, self._callback),
|
||||
variable=self._variable)
|
||||
|
||||
if default:
|
||||
self._variable.set(default)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue