new-gui/label.go

16 lines
236 B
Go
Raw Normal View History

package gui
import (
"git.wit.org/wit/gui/toolkit"
)
func (n *Node) NewLabel(text string) *Node {
newNode := n.New(text, toolkit.Label, nil)
var a toolkit.Action
a.Type = toolkit.Add
newaction(&a, newNode, n)
return newNode
}