linklabel equivalent

1 Answer 163 Views
General Discussions Label
darin
Top achievements
Rank 1
Iron
Iron
darin asked on 24 Mar 2022, 03:02 PM

We use the standard windows UI LinkLabel to display a hyperlink  in our software. I found 

https://docs.telerik.com/devtools/winforms/knowledge-base/link-label

 

but, the issue with this is it is forcing color/font to the label - which i know a linklabel does. But, doesn't the theme have a linklabel "standard"?

Also, I don't understand the radlabel.linkarea value, and i can't seem to find that explained anywhere.

 

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 25 Mar 2022, 11:33 AM

Hello Darin,

I will start with that our Telerik UI for WinForms suite does not include RadLinkLabel control. The KB article describes how you can use the RadLabel control to simulate the MS LinkLabel control. In the example, the color of the RadLabel is changed so it shows that the user has already visited this link. This approach is not themeable. This is a custom solution and if you want to respect the current theme colors, you will need to manually change the code. 

As for your last question, RadLabel control does not have LinkArea property and I am not sure what you are referencing here. May I ask you to elaborate more on your question? In the example, we are using the Process.Start() method to open the link in the browser of your machine.

Regards,
Dinko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

darin
Top achievements
Rank 1
Iron
Iron
commented on 25 Mar 2022, 11:40 AM

Not sure what i was looking at with the "linkarea" - sorry for that confusion.

 

I understood that the KB was how to simulate a linklabel - i was just looking for something that is driven by themes - but you don't have one. I guess the easiest way is to make the label text underlined.

 

Thanks for your help.

darin
Top achievements
Rank 1
Iron
Iron
commented on 25 Mar 2022, 11:42 AM

And now the question is how to take the whatever font is currently being shown and only underline it.
Dinko | Tech Support Engineer
Telerik team
commented on 25 Mar 2022, 12:42 PM

If I have correctly understood your question, you don't want to change the FontFamily property of the font and only change the FontStyle. In this case, you can pass the parameters to the constructor of the Font using the FontFamily and Size properties. Am I in the right direction?

this.Font = new Font(this.Font.FontFamily,this.Font.Size,FontStyle.Underline);

darin
Top achievements
Rank 1
Iron
Iron
commented on 25 Mar 2022, 01:42 PM

That changed the font, thanks.
Tags
General Discussions Label
Asked by
darin
Top achievements
Rank 1
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or