MCPcopy Index your code
hub / github.com/python/cpython / simulate_mouse_click

Function simulate_mouse_click

Lib/test/test_tkinter/support.py:81–87  ·  view source on GitHub ↗

Generate proper events to click at the x, y position (tries to act like an X server).

(widget, x, y)

Source from the content-addressed store, hash-verified

79 tkinter._default_root = None
80
81def 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
90import _tkinter

Callers 3

test_traversalMethod · 0.90
test_tag_bindMethod · 0.90

Calls 1

event_generateMethod · 0.80

Tested by 3

test_traversalMethod · 0.72
test_tag_bindMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…