From 53db57745f2b0bdb0d6097d6d12d3d7af8f6c639 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 24 Feb 2014 10:56:35 -0500 Subject: Added Control.preferredSize() and preferredSize() for all the standard Controls. --- lineedit.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lineedit.go') 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 +} -- cgit v1.2.3