Disabled Button – Fyne GUI Golang tutorial 42
Disabled Button – Fyne GUI Golang tutorial 42
package main // import fyne import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" ) func main() { // new app a := app.New() // new window and title w := a.NewWindow("Disabled Button") // resize window w.Resize(fyne.NewSize(400, 400)) disabled_button := widget.NewButton("Disabled", func() {}) disabled_button.Disable() //this will disable btn w.SetContent( container.NewVBox( disabled_button, ), ) // show and run w.ShowAndRun() }[easy_media_download url=”http://blogvali.com/wp-content/uploads/fyne-golang-downloads/main42.go” text=”Download Code” color=”red_darker”]
Fyne Golang GUI Course