Skip to content

CodyGuo/gowi

 
 

Repository files navigation

gowi

Gui for golang, UI created by ResEdit

Code

import ( "github.com/nvsoft/gowi" . "github.com/nvsoft/gowi/declarative" "fmt" )

type MyMainWindow struct { *gowi.MainWindow label1 *gowi.Label button1 *gowi.Button }

func main() { app := gowi.New()

mw := new(MyMainWindow)

m := MainWindow{
    AssignTo:&mw.MainWindow,
    ID:1000,
    Controls:[]Control{
        Button{
            AssignTo:&mw.button1,
            ID:1001,
            OnClicked:func() {
                fmt.Println("Button clicked.")
                mw.SetWindowText("Clicked")
            },
        },
    },
}
m.Create()
m.Show()

mw.SetWindowText("Hello")
app.Run()

}

Screenshots

设计:

ResEdit

运行:

运行截图

About

Gui for golang, UI created by ResEdit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 93.3%
  • C 5.1%
  • Batchfile 1.6%