Tcl vs Tkinter

T Zimmerman tzman at bhmi.com
Tue Apr 11 14:36:52 CEST 2000


    I again am looking for help on the use of 'alt-*' to access the menus in
any application written with Tkinter. I have tried the tcl examples that
were included with the download of Python and they work as expected. So, I
am confused as to why it does not work for Tkinter widgets.  The following
script should work and should open the 'File' menu when 'alt-f' is pressed.
On NT this does nothing.


==================================================================
import Tkinter

root = Tkinter.Tk()

button = Tkinter.Menubutton(text = 'File', underline = 0)
button.pack()
menu = Tkinter.Menu(button)
button.configure(menu = menu)
menu.add_command(label = 'Hello World', underline = 0)

root.mainloop()
==================================================================

Regards,
Travis Zimmerman
tzman at bhmi.com





More information about the Python-list mailing list