diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-15 15:51:06 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-15 15:51:06 -0500 |
| commit | 558c618fbf6e8a1db88ca929531d654cb49a2b60 (patch) | |
| tree | 18efd030daae421308beac264c54720eb0b98f2f /button.go | |
| parent | c20e3a261195889029d71e9490674fe48104a170 (diff) | |
Gave all relevant controls matching SetText()/Text() pairs. Also added a TODO for Checkbox related to checked state.
Diffstat (limited to 'button.go')
| -rw-r--r-- | button.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -37,6 +37,17 @@ func (b *Button) SetText(text string) (err error) { return nil } +// Text returns the button's text. +func (b *Button) Text() string { + b.lock.Lock() + defer b.lock.Unlock() + + if b.created { + return b.sysData.text() + } + return b.initText +} + func (b *Button) make(window *sysData) error { b.lock.Lock() defer b.lock.Unlock() |
