diff options
Diffstat (limited to 'lineedit.go')
| -rw-r--r-- | lineedit.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lineedit.go b/lineedit.go index ac20030..3b08962 100644 --- a/lineedit.go +++ b/lineedit.go @@ -24,7 +24,17 @@ func NewLineEdit(text string) *LineEdit { } } -// TODO SetText +// SetText sets the LineEdit's text. +func (l *LineEdit) SetText(text string) (err error) { + l.lock.Lock() + defer l.lock.Unlock() + + if l.created { + return l.sysData.setText(text) + } + l.initText = text + return nil +} // Text returns the LineEdit's text. func (l *LineEdit) Text() string { |
