Is there an easy way to determine that the mouse pointer is currently over a particular node in a particular column of a ListBrowser Gadget?
Fri, 2018-03-16 10:55
#1
Catching mouse over ListBrowser columns
MOuse over of gadgets is always tricky as gadgets don't accept input unless they are active.
With simple gadgets you can use a commodity / input handler and test the gadget bounds, but for something like listbrowser nodes that get near impossible as the node location can't be obained.
However have you looked at the LISTBROWSER_HintInfoHook (struct Hook *) ?
You might be able to repurpose this to your needs, depending on what those needs are. Requiers a relatively recent (but public) version of listbrowser. The hook has existed for a while but was broke IIRC. Don't have the exact version to hand.
@broadblues
Yes I have (one of the first solutions I tried), and it indeed allows you to determine the actual node and column. But the problem is that it's really been designed for gadget help hints, i.e. the hook function only gets invoked after the mouse pointer has been over the gadget for some time.
To explain what I'm after: I have some listbrowser nodes the text of which are in fact URL addresses, so I wanted them to act as web links. Making the text underlined is no problem but to make them appear as real links I would need to intercept the mouse-over (in order to change the text colour).
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
Interesting. Did you try invoking GM_QUERY yourself, in respnse to mouse move and or timer event?
No but I will - thanks for the tip!
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
trixie,
If you get this to work, please post the code. I have wanted this for a similar use for a few years.
@mritter
Briefly looking at the GM_QUERY documentation doesn't fill me with much hope but I'll see what can be done here.
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2