diff options
| author | Pietro Gagliardi <[email protected]> | 2014-11-05 12:59:44 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-11-05 12:59:44 -0500 |
| commit | 5fc368fc23f0720fc193883d0709df8417268987 (patch) | |
| tree | bd929349e56551dbca795300457232093d6047b3 /basicctrls.go | |
| parent | 0bd58006a6001f830413bb4dcbb7bcad6aea3cc9 (diff) | |
Started adding TextField.ReadOnly() and implemented it (mostly) on Windows.
Diffstat (limited to 'basicctrls.go')
| -rw-r--r-- | basicctrls.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/basicctrls.go b/basicctrls.go index b80a25a..e905ad2 100644 --- a/basicctrls.go +++ b/basicctrls.go @@ -57,6 +57,11 @@ type TextField interface { // The string passed to Invalid will be displayed to the user to inform them of what specifically is wrong with the input. // Pass an empty string to remove the warning. Invalid(reason string) + + // ReadOnly and SetReadOnly get and set whether the TextField is read-only. + // A read-only TextField cannot be changed by the user, but its text can still be manipulated in other ways (selecting, copying, etc.). + ReadOnly() bool + SetReadOnly(readonly bool) } // NewTextField creates a new TextField. @@ -127,6 +132,7 @@ func NewGroup(text string, control Control) Group { // TODO rename to TextBox? merge with TextField (but cannot use Invalid())? enable/disable line wrapping? // TODO events // TODO Tab key - insert horizontal tab or tab stop? +// TODO ReadOnly type Textbox interface { Control |
