func NewLogView(parent walk.Container) (*LogView, error) { lc := make(chan string, 1024) lv := &LogView{logChan: lc} if err := walk.InitChildWidget( lv, parent, "EDIT", WS_TABSTOP|WS_VISIBLE|WS_VSCROLL|ES_MULTILINE|ES_WANTRETURN, WS_EX_CLIENTEDGE); err != nil { return nil, err } lv.setReadOnly(true) lv.SendMessage(EM_SETLIMITTEXT, 4294967295, 0) return lv, nil }
func NewMyWidget(parent walk.Container) (*MyWidget, error) { w := new(MyWidget) if err := walk.InitChildWidget( w, parent, myWidgetWindowClass, winapi.WS_VISIBLE, 0); err != nil { return nil, err } bg, err := walk.NewSolidColorBrush(walk.RGB(0, 255, 0)) if err != nil { return nil, err } w.SetBackground(bg) return w, nil }