1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package gui import ( "git.wit.org/wit/gui/toolkit" ) func (n *Node) NewLabel(text string) *Node { newNode := n.newNode(text, toolkit.Label, nil) n.Name = text n.Text = text a := newAction(n, toolkit.Add) sendAction(a, newNode, n) return newNode }