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