diff options
| author | Jeff Carr <[email protected]> | 2024-01-10 20:04:51 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-10 20:04:51 -0600 |
| commit | 1a31a687d6b2c5e96b26e82f3f27bdaa5363dc8b (patch) | |
| tree | a971cf4a741bdac021b420e4110d117dc3ce856d /basicCombobox.go | |
| parent | d617973bfe1a8ce50a013a7827547381a4f87ad9 (diff) | |
enable() and disable()v0.10.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'basicCombobox.go')
| -rw-r--r-- | basicCombobox.go | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/basicCombobox.go b/basicCombobox.go index 30946f3..01b1f6d 100644 --- a/basicCombobox.go +++ b/basicCombobox.go @@ -46,6 +46,18 @@ func (d *BasicCombobox) Ready() bool { return d.ready } +func (d *BasicCombobox) Enable() { + if d == nil {return} + if d.d == nil {return} + d.d.Enable() +} + +func (d *BasicCombobox) Disable() { + if d == nil {return} + if d.d == nil {return} + d.d.Disable() +} + func (d *BasicCombobox) Add(value any) { if ! d.Ready() {return} log.Log(INFO, "BasicCombobox.Add() =", value) @@ -128,8 +140,8 @@ func NewBasicCombobox(p *gui.Node, name string) *BasicCombobox { d.l = p.NewLabel(name) d.d = p.NewCombobox("") d.d.Custom = func() { - d.value = d.Get() - log.Log(INFO, "BasicCombobox.Custom() user changed value to =", d.value) + d.value = d.d.GetText() + log.Warn("BasicCombobox.Custom() user changed value to =", d.value) if d.Custom != nil { d.Custom() } |
