func (l Label) Create(window *MainWindow) { win := *window.AssignTo c := gowi.NewLabel(*win, l.ID) if l.Text != nil { c.SetWindowText(l.Text.(string)) } if l.AssignTo != nil { *l.AssignTo = c } }
func NewMainWindow() *MainWindow { w := &MainWindow{} w.Create(IDD_MAIN) b1 := gowi.NewButton(w.MainWindow, IDD_BUTTON1) l1 := gowi.NewLabel(w.MainWindow, IDD_LABEL1) b1.OnClicked = w.OnButton1Clicked l1.SetWindowText("Helloļ¼") w.button1 = b1 w.label1 = l1 return w }