new-gui/label.go

15 lines
248 B
Go
Raw Normal View History

package gui
import (
"go.wit.com/gui/toolkits"
)
func (parent *Node) NewLabel(text string) *Node {
newNode := parent.newNode(text, toolkit.Label)
a := newAction(newNode, toolkit.Add)
a.Text = text
a.S = text
sendAction(a)
return newNode
}