Issue 25684: ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu (original) (raw)
Created on 2015-11-20 17:24 by Bryan.Oakley, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 2276 | merged | cheryl.sabella,2017-06-19 13:03 | |
PR 2959 | merged | cheryl.sabella,2017-07-31 11:08 | |
PR 2960 | merged | cheryl.sabella,2017-07-31 16:22 |
Messages (8) | ||
---|---|---|
msg255001 - (view) | Author: Bryan Oakley (Bryan.Oakley) | Date: 2015-11-20 17:24 |
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. | ||
msg255099 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2015-11-22 13:05 |
Could you provide a patch Bryan? | ||
msg296330 - (view) | Author: Cheryl Sabella (cheryl.sabella) * ![]() |
Date: 2017-06-19 13:20 |
I submitted a patch based on Bryan's original workaround on SO. Thanks. | ||
msg296576 - (view) | Author: Cheryl Sabella (cheryl.sabella) * ![]() |
Date: 2017-06-21 19:28 |
I've now added unittests for this change. | ||
msg299548 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-07-31 09:30 |
New changeset a568e5273382a5dca0c27274f7d8e34c41a87d4d by Serhiy Storchaka (csabella) in branch 'master': bpo-25684: ttk.OptionMenu radiobuttons weren't unique (#2276) https://github.com/python/cpython/commit/a568e5273382a5dca0c27274f7d8e34c41a87d4d | ||
msg299578 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-07-31 19:10 |
New changeset 2bf1586e60a6639b532cd8e3442ae33064523eb1 by Serhiy Storchaka (csabella) in branch '3.6': [3.6] bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (#2959) https://github.com/python/cpython/commit/2bf1586e60a6639b532cd8e3442ae33064523eb1 | ||
msg301801 - (view) | Author: Mariatta (Mariatta) * ![]() |
Date: 2017-09-10 06:02 |
New changeset e1847ea4a9bdc7549893091a63e14f2afbdecc32 by Mariatta (Cheryl Sabella) in branch '2.7': bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (GH-2960) https://github.com/python/cpython/commit/e1847ea4a9bdc7549893091a63e14f2afbdecc32 | ||
msg301802 - (view) | Author: Mariatta (Mariatta) * ![]() |
Date: 2017-09-10 06:03 |
Fixed and backported to 3.6 and 2.7. Thanks, all! |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:24 | admin | set | github: 69870 |
2017-09-10 06:03:47 | Mariatta | set | status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved |
2017-09-10 06:02:17 | Mariatta | set | nosy: + Mariattamessages: + |
2017-07-31 19:10:16 | serhiy.storchaka | set | messages: + |
2017-07-31 16:22:51 | cheryl.sabella | set | pull_requests: + <pull%5Frequest3008> |
2017-07-31 11:08:42 | cheryl.sabella | set | pull_requests: + <pull%5Frequest3007> |
2017-07-31 09:30:11 | serhiy.storchaka | set | messages: + |
2017-07-16 16:49:26 | serhiy.storchaka | set | stage: needs patch -> patch review |
2017-06-21 19:28:10 | cheryl.sabella | set | nosy: + gpolomessages: + |
2017-06-19 13:20:30 | cheryl.sabella | set | nosy: + cheryl.sabellamessages: + |
2017-06-19 13:03:01 | cheryl.sabella | set | pull_requests: + <pull%5Frequest2325> |
2016-10-24 20:56:38 | serhiy.storchaka | set | versions: + Python 3.7, - Python 3.4 |
2015-11-22 13:05:21 | serhiy.storchaka | set | messages: + |
2015-11-20 18:19:25 | serhiy.storchaka | set | assignee: serhiy.storchakastage: needs patchnosy: + serhiy.storchakaversions: - Python 3.2, Python 3.3 |
2015-11-20 17:25:41 | Bryan.Oakley | set | type: behavior |
2015-11-20 17:24:48 | Bryan.Oakley | create |