[Tutor] enter key
jfouhy at paradise.net.nz
jfouhy at paradise.net.nz
Tue Apr 5 12:16:59 CEST 2005
Quoting Diana Hawksworth <dianahawks at optusnet.com.au>:
> I am using the tkinter toolkit. Just wish to have the button I have
> formed replaced by the Enter key - if possible. Would the raw_input() work, as
> Bernard has suggested, or do I need another piece of code that refers to
> the Enter key?
A couple of people have mentioned event bindings. Another alternative you could
look into is using Python Megawidgets. These are some widgets built on top of
Tk. Get them from http://pmw.sourceforge.net/. Using Pmw, you could replace
your Entry widget with a Pmw.EntryWidget, and then just set the 'command' option.
I recommend Pmw if you are going to do much with Tkinter, since they give you
some nice stuff :-)
--
John.
More information about the Tutor
mailing list