草庐IT

go - 在 mac 上构建 google/gxui 示例错误

我从github.com/google/gxuigitclone代码然后cdsamples/hello_wordGOOS=windowsgobuild发生错误它说/d01/gopath/src/github.com/goxjs/gl/gl_opengl.go:10:2:nobuildableGosourcefilesin/d01/gopath/src/github.com/go-gl/gl/v2.1/gl/d01/gopath/src/github.com/goxjs/glfw/desktop.go:10:2:nobuildableGosourcefilesin/d01/gopath/

scroll - 使用 GXUI 在 Go 中使窗口滚动

我正在尝试使用GXUI在我的Go应用程序窗口中添加滚动条。假设我有这段代码:packagemainimport("fmt""github.com/google/gxui""github.com/google/gxui/drivers/gl""github.com/google/gxui/samples/flags""github.com/google/gxui/themes/dark")funcappMain(drivergxui.Driver){theme:=dark.CreateTheme(driver)window:=theme.CreateWindow(800,600,"Gri

scroll - 使用 GXUI 在 Go 中使窗口滚动

我正在尝试使用GXUI在我的Go应用程序窗口中添加滚动条。假设我有这段代码:packagemainimport("fmt""github.com/google/gxui""github.com/google/gxui/drivers/gl""github.com/google/gxui/samples/flags""github.com/google/gxui/themes/dark")funcappMain(drivergxui.Driver){theme:=dark.CreateTheme(driver)window:=theme.CreateWindow(800,600,"Gri

user-interface - GXUI中如何设置LinearLayout的大小

我正在尝试用GXUI制作网格,我用LinearLayout对于行和列,但我在调整它的大小时遇到​​了问题。packagemainimport("fmt""github.com/google/gxui""github.com/google/gxui/math""github.com/google/gxui/drivers/gl""github.com/google/gxui/samples/flags""github.com/google/gxui/themes/dark")funcappMain(drivergxui.Driver){theme:=dark.CreateTheme(dr

user-interface - GXUI中如何设置LinearLayout的大小

我正在尝试用GXUI制作网格,我用LinearLayout对于行和列,但我在调整它的大小时遇到​​了问题。packagemainimport("fmt""github.com/google/gxui""github.com/google/gxui/math""github.com/google/gxui/drivers/gl""github.com/google/gxui/samples/flags""github.com/google/gxui/themes/dark")funcappMain(drivergxui.Driver){theme:=dark.CreateTheme(dr

user-interface - Go GXUI - 如何设置文本框大小?

我目前正在尝试弄清楚如何设置GoGXUI文本框的大小。我试过:textBox:=theme.CreateTextBox()textBox.SetText("")textBox.SetSize(math.Size{W:300,H:300})但它似乎不起作用-我得到的是一个窄长方形条。当我更改文本时,它会向下扩展,但不会向两侧扩展。 最佳答案 你尝试过goroutine吗?gofunc(){driver.Call(func(){textBox.SetSize(math.Size{W:300,H:300})})}()