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

Function _tooltip

Lib/idlelib/tooltip.py:170–182  ·  view source on GitHub ↗
(parent)

Source from the content-addressed store, hash-verified

168
169
170def _tooltip(parent): # htest #
171 top = Toplevel(parent)
172 top.title("Test tooltip")
173 x, y = map(int, parent.geometry().split('+')[1:])
174 top.geometry("+%d+%d" % (x, y + 150))
175 label = Label(top, text="Place your mouse over buttons")
176 label.pack()
177 button1 = Button(top, text="Button 1 -- 1/2 second hover delay")
178 button1.pack()
179 Hovertip(button1, "This is tooltip text for button1.", hover_delay=500)
180 button2 = Button(top, text="Button 2 -- no hover delay")
181 button2.pack()
182 Hovertip(button2, "This is tooltip\ntext for button2.", hover_delay=None)
183
184
185if __name__ == '__main__':

Callers

nothing calls this directly

Calls 7

ToplevelClass · 0.85
HovertipClass · 0.85
LabelClass · 0.50
ButtonClass · 0.50
titleMethod · 0.45
splitMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…