CARDs – Fyne GUI Golang tutorial 18

CARDs – Fyne GUI Golang tutorial 18

package main
// importing fyne
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/widget"
)
func main() {
// new app
a := app.New()
//New window
w := a.NewWindow("CARDS In Fyne")
// Resize
w.Resize(fyne.NewSize(400, 400))
// Card Widget
card := widget.NewCard(
"Here is My Title",
"Here is my SubTitle",
// here you can use any Widget
canvas.NewImageFromFile("c:/dice/dice1.jpg"),
)
//Showing content
w.SetContent(card)
w.ShowAndRun() //Show and Run App
}
Download Code

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: