Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Is there any way to display a linked text?

Is there any way to display a linked text?

Scheduled Pinned Locked Moved C#
graphicsquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    printscreen12345
    wrote on last edited by
    #1

    I'm using the graphics drawstring function to display a whole page of text. Can can I make some of the text linkable?

    E G 2 Replies Last reply
    0
    • P printscreen12345

      I'm using the graphics drawstring function to display a whole page of text. Can can I make some of the text linkable?

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      I think you'd have to draw the "blue" text yourself, handle the mousemove event to change the cursor and handle the mousedown / mouseup / click event and decide where the mouse was and if the link is to be activated.


      Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

      1 Reply Last reply
      0
      • P printscreen12345

        I'm using the graphics drawstring function to display a whole page of text. Can can I make some of the text linkable?

        G Offline
        G Offline
        Graham Nimbley
        wrote on last edited by
        #3

        Have you tried using System.Windows.Forms.LinkLabel class? Graham.

        P 1 Reply Last reply
        0
        • G Graham Nimbley

          Have you tried using System.Windows.Forms.LinkLabel class? Graham.

          P Offline
          P Offline
          printscreen12345
          wrote on last edited by
          #4

          can it handle both painted text and link label at the same time? I tried using both painted text and label (not link label) and the painted text were not displayed. So I assumed it would have the same problem?!!!?

          G 1 Reply Last reply
          0
          • P printscreen12345

            can it handle both painted text and link label at the same time? I tried using both painted text and label (not link label) and the painted text were not displayed. So I assumed it would have the same problem?!!!?

            G Offline
            G Offline
            Graham Nimbley
            wrote on last edited by
            #5

            Yes, the control handles the user interaction of the hyperlink for you and renders the text and link both at the same time. It will even change the color of the hyperlink when visited (akin to IE/Firefox and other browsers). Just locate the control as the position you require using .Location

            P 1 Reply Last reply
            0
            • G Graham Nimbley

              Yes, the control handles the user interaction of the hyperlink for you and renders the text and link both at the same time. It will even change the color of the hyperlink when visited (akin to IE/Firefox and other browsers). Just locate the control as the position you require using .Location

              P Offline
              P Offline
              printscreen12345
              wrote on last edited by
              #6

              It seems working now. Thanks a lot.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups