summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/label.go
blob: 23d49274777c545e0a6db1b5784503374b0ddc00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package toolkit

import "log"

import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"

func NewLabel(b *ui.Box, name string) *Toolkit {
	// make new node here
	log.Println("gui.Toolbox.NewLabel", name)
	var t Toolkit

	if (b == nil) {
		log.Println("gui.ToolboxNode.NewLabel() node.UiBox == nil. I can't add a range UI element without a place to put it")
		return &t
	}
	l := ui.NewLabel(name)
	t.uiLabel = l
	t.uiBox = b
	t.uiBox.Append(l, false)

	return &t
}