[issue2806] Py30a5: Tk Menu Alt-f behaves differently Linux vs Windows

Mark Summerfield report at bugs.python.org
Thu May 15 09:45:36 CEST 2008


Mark Summerfield <mark at qtrac.eu> added the comment:

This bug can be worked around by using the more modern style of menu
creation. If the program that exhibits the bug has its __init__()
replaced as follows it works correctly on both Linux and Windows:

    def __init__(self, parent):
        self.parent = parent
        menu = Menu(self.parent)
        self.parent.config(menu=menu)
        fileMenu = Menu(menu)
        for label, command in (
                ("New...", self.fileNew),
                ("Open...", self.fileOpen),
                ("Quit", self.fileQuit)):
            fileMenu.add_command(label=label, command=command)
        menu.add_cascade(label="File", menu=fileMenu, underline=0)

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2806>
__________________________________


More information about the Python-bugs-list mailing list