Excellent, thanks Detlev!
________________________________ From: Detlev Offenbach Sent: Tuesday, November 8, 2022 2:46 PM To: Matic Kukovec; Baz Walter; [email protected] Subject: Re: Margin mouse hover / tooltip? Hi, I realize this receipe in the eric code editor for the context menu event already. You may have a look at https://hg.die-offenbachs.homelinux.org/eric/file/tip/src/eric7/QScintilla/Editor.py lines 5594 and following. Regards, Detlev Am 08.11.22 um 14:43 schrieb Matic Kukovec: Very good! Thanks Baz ________________________________ From: Baz Walter <[email protected]><mailto:[email protected]> Sent: Tuesday, November 8, 2022 2:34 PM To: [email protected]<mailto:[email protected]> <[email protected]><mailto:[email protected]> Subject: Re: Margin mouse hover / tooltip? On 08/11/2022 09:27, Matic Kukovec wrote: > Does anybody know if it's possible to catch a "MouseMove" or "ToolTip" event > on a margin and knowing it's on a margin? > I am adding markers to a margin and would like to display a tooltip or > statustip for the markers on mouse hover. I don't think there's any built-in tooltip events for margins. However, you can reimplement mouseMoveEvent and get the line number with QsciScintilla.lineAt(event.pos()) whilst hovering on the margins. The margin number can be determined by comparing the margin widths with event.x(). The current margin count can be determined with QsciScintilla.margin(), and the width of each margin with QsciScintilla.marginWidth(index). By default, there are five margins. Hidden margins have zero width. -- Detlev Offenbach [email protected]<mailto:[email protected]>
