label with link in it

7 posts, 1 answers
  1. Lily
    Lily avatar
    19 posts
    Member since:
    Jan 2011

    Posted 18 Feb 2011 Link to this post

    I have RadLabel with the followng code:

    lblInfo.Text =

    "<html><span><a href=" + url + ">Getting Started Guide</a></span></html>"
    I have to problems:
    1. The url is pointong to pdf file. If pdf file is not installed it does not give any error, link just does not work without any indication that it attempted to open the file.
    2. The of the link is 3 words with spaces. They are shown three separate links. The screenshot is attached.
    Thank you
    Lily

     

  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 19 Feb 2011 Link to this post

    Hello Lily,

    You can workaround the links showing as three separate words by including an underscore which won't show when rendered as a link.
    For example (Getting_Started_Guide)
    this.radLabel1.Text = "<html><span><a href=http://www.telerik.com>Getting_Started_Guide</a></span></html>";

    I hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Lily
    Lily avatar
    19 posts
    Member since:
    Jan 2011

    Posted 21 Feb 2011 Link to this post

    Thank you, that helped. But another problem still persists. If I do not have pdf reader installed on my machine, link does not work and no indication of error is given.
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Feb 2011 Link to this post

    Hello Lily,

    I have been trying to find a PC in my office that doesn't have or require a PDF reader to try this out, but as yet with no luck. I will look again when I am back in the office for you tomorrow. I have also looked on the Telerik Public Issue Tracking System and there are no issues that list your problem there.
    In the meantime, may I ask you to mark the previous reply as answer as it solves your first question and I'll do my best to come back to you regarding this second problem as soon as I can.
    Thanks
    Richard
  6. Lily
    Lily avatar
    19 posts
    Member since:
    Jan 2011

    Posted 21 Feb 2011 Link to this post

    Thank you.
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 22 Feb 2011 Link to this post

    Hello Lily,

    I can confirm that I can replicate this. It's the same if you give it a filename that doesn't exist. Unfortunatly, I'm unable to offer a workaround. Perhaps this will be picked up for a fix in an upcoming release.

    If you need any further information, please let me know.
    Regards,
    Richard
  8. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 23 Feb 2011 Link to this post

    Hi Lily, 

    Thank you for the writing.

    This is known behavior of the Html-like feature and you can work around it by following Richard's suggestion.

    Do not hesitate to contact us if you have other questions.

    Kind regards,
    Peter
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
UI for WinForms is Visual Studio 2017 Ready