summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/textbox.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/andlabs/textbox.go')
-rw-r--r--toolkit/andlabs/textbox.go25
1 files changed, 18 insertions, 7 deletions
diff --git a/toolkit/andlabs/textbox.go b/toolkit/andlabs/textbox.go
index 56788d8..1745d11 100644
--- a/toolkit/andlabs/textbox.go
+++ b/toolkit/andlabs/textbox.go
@@ -8,14 +8,25 @@ import (
func (p *node) newTextbox(n *node) {
newt := new(andlabsT)
- e := ui.NewNonWrappingMultilineEntry()
- newt.uiMultilineEntry = e
- newt.uiControl = e
+ if (n.X == 1) {
+ e := ui.NewEntry()
+ newt.uiEntry = e
+ newt.uiControl = e
- e.OnChanged(func(spin *ui.MultilineEntry) {
- n.S = spin.Text()
- n.doUserEvent()
- })
+ e.OnChanged(func(spin *ui.Entry) {
+ n.S = spin.Text()
+ n.doUserEvent()
+ })
+ } else {
+ e := ui.NewNonWrappingMultilineEntry()
+ newt.uiMultilineEntry = e
+ newt.uiControl = e
+
+ e.OnChanged(func(spin *ui.MultilineEntry) {
+ n.S = spin.Text()
+ n.doUserEvent()
+ })
+ }
n.tk = newt
p.place(n)
}