#command是给按钮指定动作,这是一种特殊事件处理,但Tkinter远不止这一种事件处理机制
#例如你想获取你在界面中点击处的坐标
from tkinter import *
top=Tk()
def click_pos(event) :
print(event.x,event.y)
top.bind("<Button-1>"
#command是给按钮指定动作,这是一种特殊事件处理,但Tkinter远不止这一种事件处理机制
#例如你想获取你在界面中点击处的坐标
from tkinter import *
top=Tk()
def click_pos(event) :
print(event.x,event.y)
top.bind("<Button-1>"