-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
刘乾洪
committed
May 19, 2021
1 parent
de9ec4b
commit bca6c82
Showing
4 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/liuqianhong6007/fyne | ||
|
||
go 1.15 | ||
|
||
require fyne.io/fyne/v2 v2.0.3 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package main | ||
|
||
import ( | ||
"fyne.io/fyne/v2/app" | ||
"fyne.io/fyne/v2/container" | ||
"fyne.io/fyne/v2/widget" | ||
) | ||
|
||
func main() { | ||
a := app.New() | ||
w := a.NewWindow("Hello") | ||
|
||
hello := widget.NewLabel("Hello Fyne!") | ||
w.SetContent(container.NewVBox( | ||
hello, | ||
widget.NewButton("Hi!", func() { | ||
hello.SetText("Welcome :)") | ||
}), | ||
)) | ||
|
||
w.ShowAndRun() | ||
} |