summaryrefslogtreecommitdiff
path: root/basicctrls.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-23 16:54:21 -0400
committerPietro Gagliardi <[email protected]>2014-10-23 16:54:21 -0400
commit92c7598d9d0b1ec8a68f55c8a8a9e46ca1a1db50 (patch)
treed8c36c8223ace0b75990e3e2d4514a929ae79f7f /basicctrls.go
parentba31d13c6d961545037cf0572c717e2643893180 (diff)
Added Textbox and implemented it on Windows.
Diffstat (limited to 'basicctrls.go')
-rw-r--r--basicctrls.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/basicctrls.go b/basicctrls.go
index 1ef720b..1f8516d 100644
--- a/basicctrls.go
+++ b/basicctrls.go
@@ -121,3 +121,20 @@ type Group interface {
func NewGroup(text string, control Control) Group {
return newGroup(text, control)
}
+
+// Textbox represents a multi-line text entry box.
+// Text in a Textbox is unformatted, and scrollbars are applied automatically.
+// TODO rename to TextBox? merge with TextField (but cannot use Invalid())? enable/disable line wrapping?
+// TODO events
+type Textbox interface {
+ Control
+
+ // Text and SetText get and set the Textbox's text.
+ Text() string
+ SetText(text string)
+}
+
+// NewTextbox creates a new Textbox.
+func NewTextbox() Textbox {
+ return newTextbox()
+}