Skip to content

Instantly share code, notes, and snippets.

@ishuah
Created March 5, 2021 07:24
Show Gist options
  • Save ishuah/6b5b97131639c7ce410abb7b9caecec3 to your computer and use it in GitHub Desktop.
Save ishuah/6b5b97131639c7ce410abb7b9caecec3 to your computer and use it in GitHub Desktop.
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("germ")
ui := widget.NewTextGrid() // Create a new TextGrid
ui.SetText("I'm on a terminal!") // Set text to display
// Create a new container with a wrapped layout
// set the layout width to 420, height to 200
w.SetContent(
fyne.NewContainerWithLayout(
layout.NewGridWrapLayout(fyne.NewSize(420, 200)),
ui,
),
)
w.ShowAndRun()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment