go-gtk
go-gtk copied to clipboard
Excuse me, why didn't I load the WINDOW from glade?
window := gtk.WindowFromObject(builder.GetObject("window1")) You can't find the gtk. Windows fromobject () method.
please show me your code.
func (obj *Chessboard) CreateWindow() { //加载glade文件 builder := gtk.NewBuilder() builder.AddFromFile("ui.glade")
//窗口相关
obj.window = gtk.Window(builder.GetObject("window1"))
obj.window.SetAppPaintable(true)
obj.window.SetPosition(gtk.WIN_POS_CENTER)
obj.w, obj.h = 800, 480
obj.window.SetSizeRequest(800, 480)
obj.window.SetDecorated(false)
obj.window.SetEvents(int(gdk.BUTTON_PRESS_MASK | gdk.BUTTON1_MOTION_MASK))
}
I have the same problem, thank you.
I have the same problem,ありがとう
I have the same problem, my Go version is go version go1.12.1 windows/amd64
.
I have reinstall my environment including tool-chain , glade for several times but still not work. Please help me.
""undefined: gtk.WindowFromObject"" This is the error message I got.
I have the same problem,thank you
I have the same problem, ""undefined: gtk.WindowFromObject""
Did you read installation instruction?
https://github.com/mattn/go-gtk#install