CRUD App Student Record – Fyne Golang GUI Tutorial 57

CRUD App Student Record – Fyne Golang GUI Tutorial 57

 

 


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 title and window
    w := a.NewWindow("CRUD APP")
    // resize window
    w.Resize(fyne.NewSize(400, 400))
    // entry widget for name
    e_name := widget.NewEntry()
    e_name.SetPlaceHolder("Enter name here...")
    // entry widget for phone
    e_phone := widget.NewEntry()
    e_phone.SetPlaceHolder("Enter phone here...")
    // submit button
    submit_btn := widget.NewButton("Submit", func() {})
    // show and run
    w.SetContent(
        // vbox container
        container.NewVBox(e_name, e_phone, submit_btn),
    )
    w.ShowAndRun()
}

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: