summaryrefslogtreecommitdiff
path: root/listbox.go
diff options
context:
space:
mode:
Diffstat (limited to 'listbox.go')
-rw-r--r--listbox.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/listbox.go b/listbox.go
index 9f87ad6..b333f79 100644
--- a/listbox.go
+++ b/listbox.go
@@ -110,3 +110,11 @@ func (l *Listbox) setRect(x int, y int, width int, height int) error {
return l.sysData.setRect(x, y, width, height)
}
+
+func (l *Listbox) preferredSize() (width int, height int, err error) {
+ l.lock.Lock()
+ defer l.lock.Unlock()
+
+ width, height = l.sysData.preferredSize()
+ return
+}