From 558c618fbf6e8a1db88ca929531d654cb49a2b60 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 15 Feb 2014 15:51:06 -0500 Subject: Gave all relevant controls matching SetText()/Text() pairs. Also added a TODO for Checkbox related to checked state. --- checkbox.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'checkbox.go') 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() } -- cgit v1.2.3