2019-06-02 15:40:44 -05:00
|
|
|
package gui
|
|
|
|
|
2024-01-05 13:18:44 -06:00
|
|
|
import "go.wit.com/gui/widget"
|
2021-10-31 14:21:36 -05:00
|
|
|
|
2023-05-09 08:38:33 -05:00
|
|
|
func (parent *Node) NewButton(name string, custom func()) *Node {
|
2024-01-05 13:18:44 -06:00
|
|
|
newNode := parent.newNode(name, widget.Button)
|
2023-05-09 20:25:37 -05:00
|
|
|
newNode.Custom = custom
|
2024-01-11 19:32:40 -06:00
|
|
|
newNode.value = name
|
|
|
|
newNode.progname = name
|
2023-03-23 12:35:12 -05:00
|
|
|
|
2024-01-13 22:02:12 -06:00
|
|
|
// inform the toolkits
|
|
|
|
sendAction(newNode, widget.Add)
|
2021-10-31 14:21:36 -05:00
|
|
|
return newNode
|
|
|
|
}
|