Margin mouse hover / tooltip?

Matic Kukovec kukovecmatic at hotmail.com
Tue Nov 8 13:43:43 GMT 2022


Very good! Thanks Baz
________________________________
From: Baz Walter <bazwal at gmail.com>
Sent: Tuesday, November 8, 2022 2:34 PM
To: qscintilla at riverbankcomputing.com <qscintilla at riverbankcomputing.com>
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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20221108/800e323d/attachment.htm>


More information about the QScintilla mailing list