Capturing clicks in a window,capturingclicks,from Tkinter
Capturing clicks in a window,capturingclicks,from Tkinter
from Tkinter import *root = Tk()def callback(event): print 'clicked at', event.x, event.y frame = Frame(root, width=100, height=100)frame.bind('<Button-1>', callback)frame.pack()root.mainloop()
相关内容
- try/except/else,tryexceptelse,# try: nu
- Use system function to output,functionoutput,import sys
- Print out exception info,printexception,#the excepti
- Concatinate two lists,concatinatelists,inventory =
- While with break,whilewithbreak,while 1:
- How to Update Lists,howtoupdatelists,aList = [123
- Convert string:normal to unicode,normalunicode,print unicod
- Open a webbrowser with Google.,openwebbrowser,'''PYTHON SO
- Splitting Pathnames,splittingpathnames,import os os
- Define and use Modules,definemodules,# Fibonacci
评论关闭