Question RichTextBox links so the path doesn't show

Superfurry

Member
Joined
Feb 8, 2011
Messages
19
Programming Experience
1-3
Hiya everybody I'm wondering if you can help me with a problem , what it is I have made a tool that scrapes the links of a page , I'm not sure the name like an apache page? Any how the links are being out into a rich text box and clickable to download the file . My question is , is there a way that I can make the links so the path doesn't show and just the file but is still clickable ? I've tryed appending and cutting but it makes it un clickable , pleas help it's driving me insane :) thanks
 
I've not worked through the article, but it appears that the RichTextBox can't do this by default and there is some work required to override the default behavior to do what you want. My first instinct was to store hyperlinks and their associated text pairs, then if you override the LinkClicked event, you could lookup the full hyperlink and open it. The default RichTextBox has the ability to detect certain patterns and identify them as hyperlinks, but for what you want to do (and what the CodeProject article is doing) you would need to tell it which texts are hyperlinks.

I would be tempted to try to use the CodeProject example and tweak it if necessary. There are several C# to VB converters out there if you're not familiar with C#.

Good luck!
 
Back
Top