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

Method position_window

Lib/idlelib/tooltip.py:47–52  ·  view source on GitHub ↗

(re)-set the tooltip's screen position

(self)

Source from the content-addressed store, hash-verified

45 self.tipwindow.lift() # work around bug in Tk 8.5.18+ (issue #24570)
46
47 def position_window(self):
48 """(re)-set the tooltip's screen position"""
49 x, y = self.get_position()
50 root_x = self.anchor_widget.winfo_rootx() + x
51 root_y = self.anchor_widget.winfo_rooty() + y
52 self.tipwindow.wm_geometry("+%d+%d" % (root_x, root_y))
53
54 def get_position(self):
55 """choose a screen position for the tooltip"""

Callers 1

showtipMethod · 0.95

Calls 4

get_positionMethod · 0.95
winfo_rootxMethod · 0.80
winfo_rootyMethod · 0.80
wm_geometryMethod · 0.80

Tested by

no test coverage detected