Mouse action: single click, double click,mouseclick,import Tkint
Mouse action: single click, double click,mouseclick,import Tkint
import Tkinterfrom Tkinter import *root = Tk()prompt='Click any button'L = Label(root, text=prompt, width=len(prompt))L.pack()def do_mouse(eventname): def mouse_binding(event): msg = 'Mouse event %s' % eventname L.config(text=msg) L.bind_all('<%s>'%eventname, mouse_binding)for i in range(1,4): do_mouse('Button-%s'%i) do_mouse('ButtonRelease-%s'%i) do_mouse('Double-Button-%s'%i)root.mainloop()
- test for List membership with in,testmembership,invent
- Reference dictionary in print function,,print '%(n)d
- Subclassing the Default ContentHandler,,from xml.sax
- Define your own class to store time and date,definesto
- String output format: %e, %f, %g and,%e%g,x = 1.234567
- Using finally clauses.,finallyclauses,def raiseExc
热门文章:
相关内容
- test for List membership with in,testmembership,inventory =
- Reference dictionary in print function,,print '%(n)d
- Subclassing the Default ContentHandler,,from xml.sax
- Define your own class to store time and date,definestore,import tim
- String output format: %e, %f, %g and,%e%g,x = 1.234567
- Using finally clauses.,finallyclauses,def raiseExc
- Draw circle,drawcircle,from Tkinter
- Inner function definition,innerdefinition,def f1():
- Used by echoes: as code form,usedechoes,num = 1 / 3.
- try with else statement,trystatement,MyError = 'h
评论关闭