New submission from Terry J. Reedy <tjre...@udel.edu>:
Item 8. on #33610. Clicking on a line in the context box jumps the editor to that line, displayed as the first line. If we do item 11, replace Label with Text, this has to start after #33763 is merged. We could determine the context line clicked from click event.y by using .dlineinfo('1.0') on the editor window to get the offset and height of textlines for the font used. Disabled texts still have an 'insert' mark that is moved by clicks. It is just not visible. The line clicked on is int(self.context.index('insert').split('.')[0]), or int(float(index('insert'))), or next(map(int, t.index('insert').split('.'))), or s=t.index('insert'); int(s[:s.find('.')]) the same as if the context were 'normal' with a visible cursor. This only works if the default click handler fires first, so the mark is moved before we look at it. The default handler is a class binding to Button (press), so we should just be able to bind to ButtonRelease, which is generally a better choice anyway "because if the user accidentally presses the button, they can move the mouse off the widget to avoid setting off the event." ---------- assignee: terry.reedy components: IDLE messages: 318636 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: click on context line should jump to line, at top of window type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33768> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com