diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-07 19:28:25 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-07 19:28:25 -0500 |
| commit | 9dc6e6f7b39e9a3615ce21e2e03f82315038a470 (patch) | |
| tree | d5d1a8e6ecb94aace8db132c8a9738907f01c06e /listbox.go | |
| parent | 48fc6fbeabaa7242c8e69e7e6037faa296a6c44d (diff) | |
Pinned (or marked for later pinninig) behavior of various controls; also improved Space()'s documentation.
Diffstat (limited to 'listbox.go')
| -rw-r--r-- | listbox.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -6,7 +6,8 @@ import ( "sync" ) -// A Listbox is a vertical list of items, of which one or (optionally) more items can be selected at any given time. +// A Listbox is a vertical list of items, of which either at most one or any number of items can be selected at any given time. +// On creation, no item is selected. type Listbox struct { // TODO Select event @@ -45,6 +46,7 @@ func (l *Listbox) Append(what ...string) (err error) { } // InsertBefore inserts a new item in the Listbox before the item at the given position. +// (TODO action on invalid index) func (l *Listbox) InsertBefore(what string, before int) (err error) { l.lock.Lock() defer l.lock.Unlock() @@ -60,6 +62,7 @@ func (l *Listbox) InsertBefore(what string, before int) (err error) { } // Delete removes the given item from the Listbox. +// (TODO action on invalid index) func (l *Listbox) Delete(index int) error { l.lock.Lock() defer l.lock.Unlock() |
