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

Method showtip

Lib/idlelib/calltip_w.py:59–78  ·  view source on GitHub ↗

Show the call-tip, bind events which will close it and reposition it. text: the text to display in the call-tip parenleft: index of the opening parenthesis in the text widget parenright: index of the closing parenthesis in the text widget, or the end of t

(self, text, parenleft, parenright)

Source from the content-addressed store, hash-verified

57 super().position_window()
58
59 def showtip(self, text, parenleft, parenright):
60 """Show the call-tip, bind events which will close it and reposition it.
61
62 text: the text to display in the call-tip
63 parenleft: index of the opening parenthesis in the text widget
64 parenright: index of the closing parenthesis in the text widget,
65 or the end of the line if there is no closing parenthesis
66 """
67 # Only called in calltip.Calltip, where lines are truncated
68 self.text = text
69 if self.tipwindow or not self.text:
70 return
71
72 self.anchor_widget.mark_set(MARK_RIGHT, parenright)
73 self.parenline, self.parencol = map(
74 int, self.anchor_widget.index(parenleft).split("."))
75
76 super().showtip()
77
78 self._bind_events()
79
80 def showcontents(self):
81 """Create the call-tip widget."""

Callers 1

calltip_showFunction · 0.45

Calls 5

_bind_eventsMethod · 0.95
superClass · 0.85
mark_setMethod · 0.45
splitMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected