Key action: Return key,keyactionreturn,from Tkinter
Key action: Return key,keyactionreturn,from Tkinter
from Tkinter import *def onReturnKey(event): print 'Got return key press'tkroot = Tk()labelfont = ('courier', 20, 'bold') widget = Label(tkroot, text='Hello bind world')widget.config(bg='red', font=labelfont) widget.config(height=5, width=20) widget.pack(expand=YES, fill=BOTH)widget.bind('<Return>', onReturnKey) widget.focus() tkroot.title('Click Me')tkroot.mainloop()
- String escape sequences Demo,escapesequences,print '\a
- Unit test for apihelper.py,unitapihelper.py,'''Unit te
- keyword arguments,arguments,def birthday
- Import a specific member from a module,importspecific,
- Reading and Writing Files: open() a file,readingwritin
- Displaying location, type and value for an int,display
热门文章:
相关内容
- String escape sequences Demo,escapesequences,print '\a'pr
- Unit test for apihelper.py,unitapihelper.py,'''Unit test
- keyword arguments,arguments,def birthday
- Import a specific member from a module,importspecific,#//File: mod
- Reading and Writing Files: open() a file,readingwriting,#open() ret
- Displaying location, type and value for an int,displayinglocation,i
- Printing to stderr,printingtostderr,print 'enter
- Replace all,replaceall,S = 'xxxxSPA
- Open a text file and write a line of text,textwrite,myfile = ope
- apply function to variable,applyvariable,args = (2,3)
评论关闭