ssa
1package gui2
3import (4"fyne.io/fyne"5"fyne.io/fyne/app"6"fyne.io/fyne/canvas"7"fyne.io/fyne/container"8"fyne.io/fyne/widget"9)
10
11type GUI struct {12a fyne.App13win fyne.Window14}
15
16func New() *GUI {17a := app.New()18win := a.NewWindow("Hello World")19win.SetContent(widget.NewVBox(20
21widget.NewLabel("Hello SSA!"),22widget.NewButton("Quit", func() {23a.Quit()24}),25))26win.SetFixedSize(true)27win.Resize(fyne.NewSize(480, 320))28
29// image := canvas.NewImageFromFile("png/LBD.png")30// win.SetContent(container.NewGridWithColumns(1, image))31
32win.ShowAndRun()33return &GUI{a: a, win: win}34}
35
36func (g *GUI) VievImage() {37image := canvas.NewImageFromFile("png/LBD.png")38g.win.SetContent(container.NewGridWithColumns(1, image))39// g.win.40}
41