Key action: Up arrow,keyactionuparrow,from Tkinter
Key action: Up arrow,keyactionuparrow,from Tkinter
from Tkinter import *def onArrowKey(event): print 'Got up arrow 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('<Up>', onArrowKey) widget.focus() tkroot.title('Click Me')tkroot.mainloop()
- Any number of parameter: turn parameter into a tuple,p
- handle multiple exceptions,multipleexceptions,# printf
- A value as a condition,valueascondition,money = int(
- Unpacking Argument Lists,unpackingargument,#The revers
- Open a file and read char by char,openchar,file = open
- Compare integers using if structures, relational operato
热门文章:
相关内容
- Any number of parameter: turn parameter into a tuple,parametertuple
- handle multiple exceptions,multipleexceptions,# printfor v
- A value as a condition,valueascondition,money = int(
- Unpacking Argument Lists,unpackingargument,#The reverse
- Open a file and read char by char,openchar,file = open(
- Compare integers using if structures, relational operators and equali
- Using the and-or Trick Safely,and-ortrick,a = '' b = '
- print rounds off digits,roundsdigits,a = 3
- Create Python codecs from Unicode mapping files,codecsmapping,'''PY
- Mixed-type conversions,mixed-type,a = 3
评论关闭