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 /checkbox.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 'checkbox.go')
| -rw-r--r-- | checkbox.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/checkbox.go b/checkbox.go index 9a83852..f28b84d 100644 --- a/checkbox.go +++ b/checkbox.go @@ -37,11 +37,23 @@ func (c *Checkbox) SetText(text string) (err error) { return nil } +// Text returns the checkbox's text. +func (c *Checkbox) Text() string { + c.lock.Lock() + defer c.lock.Unlock() + + if c.created { + return c.sysData.text() + } + return c.initText +} + // Checked() returns whether or not the checkbox has been checked. func (c *Checkbox) Checked() bool { c.lock.Lock() defer c.lock.Unlock() + // TODO if not created return c.sysData.isChecked() } |
