try fyne
This commit is contained in:
25
cmd/fyne/main.go
Normal file
25
cmd/fyne/main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"fyne.io/fyne/v2/app"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := app.New()
|
||||
w := a.NewWindow("Hello World")
|
||||
defer w.ShowAndRun()
|
||||
|
||||
l := widget.NewLabel("")
|
||||
w.SetContent(l)
|
||||
|
||||
go func() {
|
||||
for range time.NewTicker(time.Second).C {
|
||||
{
|
||||
l.SetText(time.Now().Format("2006-01-02T15:04:05"))
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
Reference in New Issue
Block a user