fyne-widgets/examples/vumeter/main.go

21 lines
445 B
Go
Raw Normal View History

2021-12-10 20:09:01 +00:00
package main
import (
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/data/binding"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("Diagonal")
level := binding.NewFloat()
levelPB := widget.NewProgressBarWithData(level)
levelPB.TextFormatter = func() string { return " " }
w.SetContent(container.New(layout.NewHBoxLayout(), levelPB))
w.ShowAndRun()
}