Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Links as hotspots #105

Closed
ghost opened this issue Aug 9, 2015 · 3 comments
Closed

Links as hotspots #105

ghost opened this issue Aug 9, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 9, 2015

Hello,

I am working on a text editor based on ScintillaNET: https://github.com/jonandr/Strindberg

I've been trying to figure out how to get ScintillaNET to highlight URLs and respond to double-clicks (so the links can be opened in a browser). I know Notepad++ does this by marking URLs as hotspots and then handling the "SCN_HOTSPOTDOUBLECLICK" message from Scintilla. Is this possible to do in ScintillaNET?

jacobslusser added a commit that referenced this issue Aug 9, 2015
@jacobslusser
Copy link
Owner

In commit 9664588 I added the missing events: HotspotClick, HotspotDoubleClick, and HotspotRelease. Let me know if you need anything else.

@theryan722
Copy link
Contributor

How do you mark something as a hotspot?
On Aug 9, 2015 7:48 PM, "jacobslusser" notifications@github.com wrote:

In commit 9664588
9664588
I added the missing events: HotspotClick, HotspotDoubleClick, and
HotspotRelease. Let me know if you need anything else.


Reply to this email directly or view it on GitHub
#105 (comment)
.

@ghost
Copy link
Author

ghost commented Aug 10, 2015

@jacobslusser Thanks.

@theryan722 I haven't tested it yet, but I think you should set the Hotspot property on the style to true and then style the text you want.

            if (_sci.Text.Length > 5)
            {
                _sci.Styles[1].Hotspot = true;
                _sci.StartStyling(0);
                _sci.SetStyling(5, 1);
            }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants