Margin mouse hover / tooltip?

Detlev Offenbach detlev at die-offenbachs.de
Tue Nov 8 13:46:44 GMT 2022


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 <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.
>
-- 
Detlev Offenbach
detlev at die-offenbachs.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20221108/17898f2f/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xBD1F26A5DA8A6150.asc
Type: application/pgp-keys
Size: 660 bytes
Desc: OpenPGP public key
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20221108/17898f2f/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20221108/17898f2f/attachment-0001.sig>


More information about the QScintilla mailing list