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)
| 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.""" |
no test coverage detected