Key action: Right key,keyactionright,from Tkinter
Key action: Right key,keyactionright,from Tkinter
from Tkinter import *def onArrowKey(event): print 'Got 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('<Right>', onArrowKey) widget.focus() tkroot.title('Click Me')tkroot.mainloop()
- Cheap and simple API helper,cheaphelper,'''Cheap and
- Draw gif image,drawgifimage,from Tkinter
- Stripping whitespace from a string.,,string1 = '\
- aligning positive and negative numbers,aligningnegativ
- When the and-or Trick Fails,and-orfails,a = '' b = '
- Map string to sys.stout.write,mapsys.stout.write,impor
热门文章:
相关内容
- Cheap and simple API helper,cheaphelper,'''Cheap and
- Draw gif image,drawgifimage,from Tkinter
- Stripping whitespace from a string.,,string1 = '\
- aligning positive and negative numbers,aligningnegative,print ('% 5
- When the and-or Trick Fails,and-orfails,a = '' b = '
- Map string to sys.stout.write,mapsys.stout.write,import syssh
- Boolean operation in if,booleanoperation,# number <=
- Move what you drew on a canvas,drewcanvas,from Tkinter
- List concatenation Demo,concatenationdemo,print [1, 2,
- Using sys.modules,usingsys.modules,import syspr
评论关闭