I am trying to figure out the basics of working with the Go GUI library, walk.
For starters, I would like to be able to
- Control the window's position
hopefully in a way similar to what other languages provide (center on screen, center to parent, exact coordinates etc). - Make the window unresizable
This is the code I have, I was hoping the MaxSize
declaration would solve the second problem, but it doesn't, and I was looking for some sort of a Position
declaration but couldn't find anything that makes sense to me.
package main
import (
// "github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
func main() {
MainWindow{
Title: "Test",
MinSize: Size{300, 50},
MaxSize: Size{300, 50}, // Doesn't work
// Position: ... // Doesn't exist
Layout: VBox{},
Children: []Widget{
Label{Text: "Hello World"},
},
}.Run()
}