title: How to display text that can be copied on a fyne GUI?
body: <p>On my <code>fyne</code> GUI, I want to display text that can be copied by the user. So far, I'm using a (multi-line) <a href="https://developer.fyne.io/api/v2.0/widget/entry.html" rel="nofollow noreferrer"><code>widget.Entry</code></a>, see example below. Although that works, it seems inappropriate since &quot;entry&quot; implies user-<em>input</em> - which is not the case here.</p>
  <p>If I use a widget.Label or canvas.Text, the characters can't be copied. So what's the best approach here?</p>
  <hr />
  <p>Example:</p>
  <pre class="lang-golang prettyprint-override"><code>package main
  
  import (
      &quot;time&quot;
  
      &quot;fyne.io/fyne/v2&quot;
      &quot;fyne.io/fyne/v2/app&quot;
      &quot;fyne.io/fyne/v2/container&quot;
      &quot;fyne.io/fyne/v2/data/binding&quot;
      &quot;fyne.io/fyne/v2/widget&quot;
  )
  
  func main() {
      myApp := app.New()
      myWindow := myApp.NewWindow(&quot;demo&quot;)
  
      txtBound := binding.NewString()
      txtWid := widget.NewEntryWithData(txtBound)
      txtWid.MultiLine = true
  
      // we can disable the Entry field so the user can't modify the text:
      txtWid.Disabled()
  
      go func() {
          for {
              txtBound.Set(time.Now().Format(&quot;2006-01-02\n15:04:05\nMST -0700&quot;))
              time.Sleep(time.Second)
          }
      }()
  
      content := container.NewBorder(nil, nil, nil, nil, txtWid)
  
      myWindow.SetContent(content)
      myWindow.Resize(fyne.NewSize(500, 300))
  
      myWindow.ShowAndRun()
  }
  </code></pre>
  <p>The text in the Entry field can be selected and then copied using either mouse/right-click context menu or ctrl-c. On Windows 10, that would look like
  <a href="https://i.stack.imgur.com/kv4mT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kv4mT.png" alt="enter image description here" /></a></p>