Generate proper events to click at the x, y position (tries to act like an X server).
(widget, x, y)
| 79 | tkinter._default_root = None |
| 80 | |
| 81 | def simulate_mouse_click(widget, x, y): |
| 82 | """Generate proper events to click at the x, y position (tries to act |
| 83 | like an X server).""" |
| 84 | widget.event_generate('<Enter>', x=0, y=0) |
| 85 | widget.event_generate('<Motion>', x=x, y=y) |
| 86 | widget.event_generate('<ButtonPress-1>', x=x, y=y) |
| 87 | widget.event_generate('<ButtonRelease-1>', x=x, y=y) |
| 88 | |
| 89 | |
| 90 | import _tkinter |
searching dependent graphs…