From 9dc6e6f7b39e9a3615ce21e2e03f82315038a470 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 7 Mar 2014 19:28:25 -0500 Subject: Pinned (or marked for later pinninig) behavior of various controls; also improved Space()'s documentation. --- listbox.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'listbox.go') diff --git a/listbox.go b/listbox.go index fa925d0..e95b5cf 100644 --- a/listbox.go +++ b/listbox.go @@ -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() -- cgit v1.2.3