lxn/walk

Transparent background

D4v1dW3bb opened this issue · 0 comments

How can I set the background to be `transparent?
The following is not working

func runApp() {
	mw := new(MyMainWindow)
	MainWindow{
		Title:    "Transparent Background",
		Visible:  false,
		MinSize:  Size{800, 600},
		Layout:   VBox{MarginsZero: true},
		AssignTo: &mw.MainWindow,
		Functions: map[string]func(args ...interface{}) (interface{}, error){
			"icon": func(args ...interface{}) (interface{}, error) {
				if strings.HasPrefix(args[0].(string), "https") {
					return "check", nil
				}

				return "stop", nil
			},
		},
	}.Create()

	win.SetBkMode(win.HDC(mw.Handle()), win.TRANSPARENT
	win.ShowWindow(mw.Handle(), win.SW_SHOW)
	mw.Run()
}