Fyne Golang GUI Course Tutorial 2 – RESIZE Window

class 2 fyne golang gui RESIZE Window

GUI based Applications are fun and easy to use.

Want to change size of your Fyne Gui App.

It is so simple..

fyne.NewSize(700, 200)

where first value is width e.g 700

and 2nd value is height e.g 200

both width and height are FLOAT.

Now It should look like below

w.Resize(fyne.NewSize(700, 200))

 

package main
// importing fyne v2
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
)
func main() {
a := app.New()
w := a.NewWindow("My title for 2nd tutorial")
//Resizin our fyne app window
// first one is width
// 2nd value is height
w.Resize(fyne.NewSize(700, 200))
w.ShowAndRun() // Running our App
}
Download Code

 

Tony BB
 

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: