add Disable() and Enable()

This commit is contained in:
Jeff Carr 2025-02-13 21:04:25 -06:00
parent 5530d2c6ad
commit a264a7d121
2 changed files with 12 additions and 0 deletions

View File

@ -103,6 +103,14 @@ func show(n *tree.Node, b bool) {
}
}
func enableWidget(n *tree.Node) {
enable(n, true)
}
func disableWidget(n *tree.Node) {
enable(n, false)
}
func enable(n *tree.Node, b bool) {
if !ready(n) {
return

View File

@ -60,6 +60,10 @@ func initTree() *tree.TreeInfo {
t.SetLabel = setLabel
t.SetText = setText
t.AddText = addText
t.Enable = enableWidget
t.Disable = disableWidget
t.SetChecked = setChecked
t.ToolkitClose = toolkitClose
t.ShowTable = showTable