fyne-io/fyne

Text turns into black box in very long Entry

Open

#678 opened on Feb 15, 2020

View on GitHub
 (13 comments) (3 reactions) (0 assignees)Go (28,262 stars) (1,526 forks)batch import
bughelp wanted

Description

Describe the bug:

When inserting a single line of text of more than ~1500 characters into a multi-line entry embedded into a ScrollContainer, a black box is displayed. Observed both on Ubuntu and cross-compiled for Windows.

To Reproduce:

Steps to reproduce the behaviour:

  1. Build the code shown below.
  2. Insert a single line of text of ~1500 characters.
  3. Observe the text turning into a black box.

Screenshots:

Before and after inserting "enough" characters: before after

Example code:

Working version to reproduce:

package main
  
import (
    "fyne.io/fyne"
    "fyne.io/fyne/app"
    "fyne.io/fyne/layout"
    "fyne.io/fyne/widget"
)

func main() {
    application := app.New()
    win := application.NewWindow("")

    container := fyne.NewContainerWithLayout(layout.NewMaxLayout())
    entry := widget.NewMultiLineEntry()
    container.AddObject(widget.NewScrollContainer(entry))

    win.SetContent(container)
    win.Resize(fyne.NewSize(400, 400))
    win.ShowAndRun()
}

Device (please complete the following information):

  • OS: Ubuntu 18.04.4 LTS and WIndows 10 (cross-compiled)
  • Go version: go1.13.6 linux/amd64
  • Fyne version: git commit 713899d

Contributor guide