bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (GH-2… · python/cpython@e1847ea · GitHub
Skip to content

Commit e1847ea

Browse files
csabellaMariatta
authored andcommitted
bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (GH-2960)
ttk.OptionMenu radiobuttons weren't unique between instances of OptionMenu. (cherry picked from commit a568e52)
1 parent ae16b99 commit e1847ea

4 files changed

Lines changed: 30 additions & 1 deletion

File tree

Lib/lib-tk/test/test_ttk/test_extensions.py

Lines changed: 25 additions & 0 deletions

Lib/lib-tk/ttk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,8 @@ def set_menu(self, default=None, *values):
16141614
menu.delete(0, 'end')
16151615
for val in values:
16161616
menu.add_radiobutton(label=val,
1617-
command=Tkinter._setit(self._variable, val, self._callback))
1617+
command=Tkinter._setit(self._variable, val, self._callback),
1618+
variable=self._variable)
16181619

16191620
if default:
16201621
self._variable.set(default)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,7 @@ James Rutherford
12291229
Chris Ryland
12301230
Constantina S.
12311231
Matthieu S
1232+
Cheryl Sabella
12321233
Patrick Sabin
12331234
Sébastien Sablé
12341235
Suman Saha
Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)