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

Method get_position

Lib/idlelib/tooltip.py:54–63  ·  view source on GitHub ↗

choose a screen position for the tooltip

(self)

Source from the content-addressed store, hash-verified

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"""
56 # The tip window must be completely outside the anchor widget;
57 # otherwise when the mouse enters the tip window we get
58 # a leave event and it disappears, and then we get an enter
59 # event and it reappears, and so on forever :-(
60 #
61 # Note: This is a simplistic implementation; sub-classes will likely
62 # want to override this.
63 return 20, self.anchor_widget.winfo_height() + 1
64
65 def showcontents(self):
66 """content display hook for sub-classes"""

Callers 1

position_windowMethod · 0.95

Calls 1

winfo_heightMethod · 0.80

Tested by

no test coverage detected