AtSynEdit - Handpoint Cursor Mouse Hovering over Link/Url

Post Reply
TomC
Posts: 13
Joined: 29.05.2022 05:11

AtSynEdit - Handpoint Cursor Mouse Hovering over Link/Url

Post by TomC »

I'm converting over from SynEdit to AtSynEdit.

Background:
I loaded a plain text file that contained a link/url eg- "www.website.com/page"..
Wow, Url Link is blue and underlined by default, Nice..
I figured out how to load web page via OnMemoClickLink Event

Question:
I would love to have Cursor change to crHandPoint, when hovering over url link with mouse..
(Might have something to do with adding a Hotspot?)
I wonder if anyone would have an example code to do this..


Thank You Sincerely..
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Post by main Alexey »

I did not try this. Maybe try this
a) override MouseMove method and handle it -- hard to do
b) add Hotspot - https://wiki.lazarus.freepascal.org/ATS ... ots_object
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Post by main Alexey »

note that links are not collected in ATsynedit as usual, they are only calculated in DoPaintXXX method before the painting, this is to avoid finding links for invisible spaces.
so I am not sure you can easily get links coords.
better find links only in OnScroll event.
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Post by main Alexey »

ah, you can get found links from ATsynedit.
read Attribs object items, whiich have Tag equal to ATEditorOptions.UrlMarkerTag.
ATEditorOptions is in unit atsynedit_globals.
Post Reply