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)

  1. where first value is width e.g 700
  2. 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))

 

[sourcecode language=”go” autolinks=”false” classname=”myclass” collapse=”false” firstline=”1″ gutter=”true” highlight=”1-3,6,9″ htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false” title=”Source Code
main.go”]

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

}

[/sourcecode] [easy_media_download url=”http://blogvali.com/wp-content/uploads/fyne-golang-downloads/main2.go” text=”Download Code” color=”red_darker”]

Fyne GoLang GUI Course

 

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: