New submission from Bryan Oakley:

Original issue was brought to my attention by this SO question: 
http://stackoverflow.com/questions/33831289/ttk-optionmenu-displaying-check-mark-on-all-menus

The ttk.OptionMenu uses radiobuttons for the dropdown menu. However, because it 
doesn't set the `variable` attribute, they all get the default. If you have two 
or more OptionMenu instances, all of the radiobuttons are tied together. If you 
select the first item in the first OptionMenu, and the second item in the 
second OptionMenu, the dropdown menu for both will show the second item checked.

The solution is to add `variable=self._variable` when creating the menu 
radiobutton items.

----------
components: Tkinter
messages: 255001
nosy: Bryan.Oakley
priority: normal
severity: normal
status: open
title: ttk.OptionMenu radiobuttons aren't unique between two instances of 
OptionMenu
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25684>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to