From 92c7598d9d0b1ec8a68f55c8a8a9e46ca1a1db50 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 23 Oct 2014 16:54:21 -0400 Subject: Added Textbox and implemented it on Windows. --- basicctrls.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'basicctrls.go') 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() +} -- cgit v1.2.3