📜  b1-motion tkinter - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:23.636000             🧑  作者: Mango

代码示例1
Tkinter provides a mechanism to let the programmer deal with events. For each widget, it's possible to bind Python functions and methods to an event.

widget.bind(event, handler)
If the defined event occurs in the widget, the "handler" function is called with an event object.

 : The mouse is moved with a mouse button being held down. To specify the left, middle or right mouse button use ,  and  respectively. The current position of the mouse pointer is provided in the x and y members of the event object passed to the callback, i.e. event.x, event.y