title: How to create an hyperlink in tcl tk?
body: <p>Im a using Tcl-Tk 8.6.4 and I am a begginner, I would like to create hyperlinks in my texts.
  I am looking for a procedure which could have the url of a website in argument, this url will be displayed in blue and underlined in my text. Of course, by clicking on the url, it will open the website.
  I have found the following code, but I am not sure that it will do what I want.</p>
  
  <pre><code>proc hyperlink { name args } {
    if { "Underline-Font" ni [ font names ] } {
      font create Underline-Font {*}[ font actual TkDefaultFont ]
      font configure Underline-Font -underline true -size 12
    }
    if { [ dict exists $args -command ] } {
      set command [ dict get $args -command ]
      dict unset args -command
    }
    label $name {*}$args -foreground blue -font Underline-Font
    if { [ info exists command ] } {
      bind $name &lt;Button-1&gt; $command
    }
    return $name
  }
  </code></pre>
  
  <p>Anyone can help me?</p>
  
  <h1>Update 2</h1>
  
  <p>The thing I want is to display hyperlinks in the text of my window like that:</p>
  
  <p>Further informations are given following those links:</p>
  
  <ul>
  <li><a href="https://ccrma.stanford.edu/~jos/NumericalInt/Lumped_vs_Distributed_Systems.html" rel="nofollow noreferrer">https://ccrma.stanford.edu/~jos/NumericalInt/Lumped_vs_Distributed_Systems.html</a></li>
  <li><a href="https://ccrma.stanford.edu/~jos/NumericalInt/NumericalInt_4up.pdf" rel="nofollow noreferrer">https://ccrma.stanford.edu/~jos/NumericalInt/NumericalInt_4up.pdf</a></li>
  </ul>
  
  <p>With the first code shown I am able to display that:
  <a href="https://i.stack.imgur.com/Cls9f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cls9f.png" alt="enter image description here"></a>
  The codes used are:</p>
  
  <ul>
  <li><p>in a procedure to read files I have tags like HTML tags such as </p>
  
  <pre><code>"&lt;hypLink&gt;" {
      gets $infile inln
      hyperlink .hl${counter} -command [list eval exec [auto_execok start] "$inln"] -text "$inln"
      pack .hl${counter}
      incr counter
  }
  </code></pre></li>
  <li><p>in my file I write</p>
  
  <p>Semi-conductors:</p>
  
  <pre><code>&lt;hypLink&gt;
  https://en.wikipedia.org/wiki/Semiconductor 
  &lt;hypLink&gt;
  http://electronics.howstuffworks.com/diode.htm
  </code></pre></li>
  </ul>
  
  <p>What can I do to have what I want?</p>
  
  <p><strong>Note</strong> The first update have been delated for copyright protection </p>