summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/textbox.go
blob: 56788d8fef17a8613dcdfcad1564bca7651b3ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
	"github.com/andlabs/ui"
	_ "github.com/andlabs/ui/winmanifest"
)

func (p *node) newTextbox(n *node) {
	newt := new(andlabsT)

	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)
}