From e09b5630899d0f4bbcfc05aa5df5cca825bff8e1 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 1 Sep 2021 15:26:08 -0500 Subject: [PATCH] UI: dump out editbox text Signed-off-by: Jeff Carr --- example-ui-radiobutton/Makefile | 4 +++- example-ui-radiobutton/main.go | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/example-ui-radiobutton/Makefile b/example-ui-radiobutton/Makefile index f1f692a..2ed1d98 100644 --- a/example-ui-radiobutton/Makefile +++ b/example-ui-radiobutton/Makefile @@ -1,3 +1,5 @@ all: - go get -v -t -u . go install + +prep: + go get -v -t -u . diff --git a/example-ui-radiobutton/main.go b/example-ui-radiobutton/main.go index 8a84fbc..65cb3fa 100644 --- a/example-ui-radiobutton/main.go +++ b/example-ui-radiobutton/main.go @@ -1,5 +1,6 @@ package main +import "log" import "github.com/andlabs/ui" import _ "github.com/andlabs/ui/winmanifest" @@ -57,6 +58,12 @@ func makeNumbersPage() ui.Control { ecbox.Append("Editable Item 3") vbox.Append(ecbox, false) + ecbox.OnChanged(func(*ui.EditableCombobox) { + log.Println("test") + test := ecbox.Text() + log.Println("test=", test) + }) + rb := ui.NewRadioButtons() rb.Append("Radio Button 1") rb.Append("Radio Button 2")