Terry J. Reedy <[email protected]> added the comment:
Akuli, what tk widgets do you think are not known to tkinter? In any case, tk
menu is known to tkinter.
I cannot reproduce when running on Windows with 3.10.0b3: Add
"print(root.children)" (after add_cascade) results in {'!menu': <tkinter.Menu
object .!menu>, '!menu2': <tkinter.Menu object .!menu2>}. The names are
created in tkinter.py lines 2564-2573.
I then see 'None' once and then '<tkinter.Tk object .>' indefinitely even while
hovering over and clicking 'click me' and the dropdown. If I click outside the
tk box, the print returns to 'None'.
Maybe there is an OS difference in what is considered to have 'focus'.
Key '#!menu' looks like '!menu' with '#' prepended. Someone could try changing
the tkinter code referenced above and see if the change appears in the bad key.
Also check the contents of root.children.
----------
nosy: +terry.reedy
resolution: duplicate ->
stage: resolved ->
status: closed -> open
superseder: Make Tkinter.py's nametowidget work with cloned menu widgets ->
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44592>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com