use SetText()

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-31 14:02:20 -06:00
parent 6514043d9f
commit d52f6a6903
3 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,6 @@ type BasicEntry struct {
func (n *BasicEntry) SetText(s string) *BasicEntry { func (n *BasicEntry) SetText(s string) *BasicEntry {
log.Log(GADGETS, "BasicEntry.Set() =", s) log.Log(GADGETS, "BasicEntry.Set() =", s)
n.v.SetValue(s)
n.v.SetText(s) n.v.SetText(s)
n.v.SetLabel(s) n.v.SetLabel(s)
return n return n

View File

@ -43,14 +43,14 @@ func (n *Duration) Set(d time.Duration) {
step = timeRange / 1000 step = timeRange / 1000
if step == 0 { if step == 0 {
log.Log(GADGETS, "duration.Set() division by step == 0", n.Low, n.High, timeRange, step) log.Log(GADGETS, "duration.Set() division by step == 0", n.Low, n.High, timeRange, step)
n.s.SetValue(0) n.s.SetInt(0)
return return
} }
offset = d - n.Low offset = d - n.Low
i := int(offset / step) i := int(offset / step)
log.Log(GADGETS, "duration.Set() =", n.Low, n.High, d, "i =", i) log.Log(GADGETS, "duration.Set() =", n.Low, n.High, d, "i =", i)
// n.s.I = i // n.s.I = i
n.s.SetValue(i) n.s.SetInt(i)
n.s.Custom() n.s.Custom()
} }

View File

@ -27,7 +27,8 @@ func (n *OneLiner) String() string {
} }
func (n *OneLiner) SetText(s string) *OneLiner { func (n *OneLiner) SetText(s string) *OneLiner {
n.SetValue(s) log.Log(GADGETS, "OneLiner.Set() =", s)
n.v.SetLabel(s)
return n return n
} }