UI: dump out editbox text

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2021-09-01 15:26:08 -05:00
parent 478750e2dd
commit e09b563089
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,5 @@
all: all:
go get -v -t -u .
go install go install
prep:
go get -v -t -u .

View File

@ -1,5 +1,6 @@
package main package main
import "log"
import "github.com/andlabs/ui" import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest" import _ "github.com/andlabs/ui/winmanifest"
@ -57,6 +58,12 @@ func makeNumbersPage() ui.Control {
ecbox.Append("Editable Item 3") ecbox.Append("Editable Item 3")
vbox.Append(ecbox, false) vbox.Append(ecbox, false)
ecbox.OnChanged(func(*ui.EditableCombobox) {
log.Println("test")
test := ecbox.Text()
log.Println("test=", test)
})
rb := ui.NewRadioButtons() rb := ui.NewRadioButtons()
rb.Append("Radio Button 1") rb.Append("Radio Button 1")
rb.Append("Radio Button 2") rb.Append("Radio Button 2")