Active links inside of a Label
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Active links inside of a Label
I want to make the links highlighted in the attachment active links. All of the text in the form is inside of a "Label" control. Is the only way to make links active is by overlaying "LinkLabel" controls? My challenge with the LinkLabel control is that the verbiage in the form changes based on situation and aligning the LinkLabel controls seems like its going to be tricky.
- Attachments
-
- 2016-08-29_11-08-40.png (29 KiB) Viewed 3725 times
- dan.potter
- Posts: 709
- Last visit: Wed Nov 14, 2018 11:39 am
Re: Active links inside of a Label
I don't see how a RichTextBox would help. Does RichTextBox allow me to embed links?
Re: Active links inside of a Label
Have you tried it?kerbob wrote:I don't see how a RichTextBox would help. Does RichTextBox allow me to embed links?
The links are automatically detected and colorized. They are not active. To activate you would have to detect a click ad look to see if it is on a link.
Re: Active links inside of a Label
Thanks to both of you. After trying, I see that I can enable DetectURLS and use the LinkClicked event handler. Still trying to figure out how to do this correctly.
Just figured it out..
$richtextbox1_LinkClicked=[System.Windows.Forms.LinkClickedEventHandler]{
[System.Diagnostics.Process]::Start($_.LinkText)
}
Gracias once again!
Just figured it out..
$richtextbox1_LinkClicked=[System.Windows.Forms.LinkClickedEventHandler]{
[System.Diagnostics.Process]::Start($_.LinkText)
}
Gracias once again!
Re: Active links inside of a Label
Now I have a need to put a link to a page using one of those ugly sharepoint links.
For example:
https://xyz.xyz.xyz.com/Lists/Topics/Di ... 4B38EE6C4C
I don't want to put this ugly link in my Rich Textbox.
Is there any way to make a "Click Here to go the web page." and embed the link? If there is, an example is worth a 1000 words.
For example:
https://xyz.xyz.xyz.com/Lists/Topics/Di ... 4B38EE6C4C
I don't want to put this ugly link in my Rich Textbox.
Is there any way to make a "Click Here to go the web page." and embed the link? If there is, an example is worth a 1000 words.
Re: Active links inside of a Label
Example Rich TextBox content:
---------
Click Here to go to a really long funky URL that I don't want to paste in my Rich Textbox.
---------
When the user clicks "Click Here", I want it to take them to https://xyz.xyz.xyz.com/Lists/Topics/Di ... 4B38EE6C4C.
The point is.. I'm trying to hide an ugly link. Is there a way to do this in Rich TextBox?
---------
Click Here to go to a really long funky URL that I don't want to paste in my Rich Textbox.
---------
When the user clicks "Click Here", I want it to take them to https://xyz.xyz.xyz.com/Lists/Topics/Di ... 4B38EE6C4C.
The point is.. I'm trying to hide an ugly link. Is there a way to do this in Rich TextBox?