event 的属性:
widgetThe widget which generated this event. This is a valid Tkinter widget instance, not a name. This attribute is set for all events.
触发事件的组件
The current mouse position, in pixels.
相对于程序的鼠标坐标
The current mouse position relative to the upper left corner of the screen, in pixels.
相对于电脑屏幕左上角的鼠标坐标
The character code (keyboard events only), as a string.
(键盘事件才有)按下键盘的按钮
The key symbol (keyboard events only).
(键盘事件才有)按下键盘按钮的名称
The key code (keyboard events only).
(键盘事件才有)按下键盘按钮的编号
The button number (mouse button events only).
(鼠标事件才有)按下鼠标的键 左中右分别为1 2 3
The new size of the widget, in pixels (Configure events only).
(改变外形的事件才有) 新组件的长宽
The event type.
事件的类型