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