Created
March 5, 2021 07:24
-
-
Save ishuah/6b5b97131639c7ce410abb7b9caecec3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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