15 lines
307 B
Go
15 lines
307 B
Go
package gui
|
|
|
|
import "go.wit.com/gui/widget"
|
|
|
|
func (parent *Node) NewButton(name string, custom func()) *Node {
|
|
newNode := parent.newNode(name, widget.Button)
|
|
newNode.Custom = custom
|
|
newNode.value = name
|
|
newNode.progname = name
|
|
|
|
// inform the toolkits
|
|
sendAction(newNode, widget.Add)
|
|
return newNode
|
|
}
|