summaryrefslogtreecommitdiff
path: root/label.go
blob: 6023ed9e63f0f28f29a96a1b16e984a5a45d4c44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}