summaryrefslogtreecommitdiff
path: root/image.go
blob: bd6b97258a3955d01dc661522065286f1e1bf643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package gui

import (
	"go.wit.com/gui/widget"
)

func (parent *Node) NewImage(name string) *Node {
	var newNode *Node
	newNode = parent.newNode(name, widget.Image)

	if ! newNode.hidden {
		a := newAction(newNode, widget.Add)
		sendAction(a)
	}
	return newNode
}