From 0bdabc5747163859ddf88e0ea0a4b1712a658bb9 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 26 Jan 2024 12:03:03 -0600 Subject: new gui version keep choices in sync add more tests for entry boxes Signed-off-by: Jeff Carr --- choices.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'choices.go') diff --git a/choices.go b/choices.go index 032a2d0..753e135 100644 --- a/choices.go +++ b/choices.go @@ -63,7 +63,16 @@ func newChoices(parent *gui.Node) *choices { c.animal.AddText("honey badger") c.animal.AddText("polar bear") - c.place = gadgets.NewBasicEntry(c.grid, "favorite place") + c.place = gadgets.NewBasicEntry(c.grid, "common favorite place") + c.place.Custom = func () { + log.Info("now set to:", c.place.String()) + if c.place == section1.place { + section2.place.SetText(c.place.String()) + } + if c.place == section2.place { + section1.place.SetText(c.place.String()) + } + } c.place.SetText("coffee shop") return c -- cgit v1.2.3