summaryrefslogtreecommitdiff
path: root/checkbox.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-14 20:41:36 -0500
committerPietro Gagliardi <[email protected]>2014-02-14 20:41:36 -0500
commit168b6eb112be70fb8c44f30a82a950bd20888b93 (patch)
treec3344a998b25fd7ab493339490c78f9fe4d8e84e /checkbox.go
parent7d80fdd0f1e5ce7d0a88b29d26237c864a43e39a (diff)
Handled all controls's created field.
Diffstat (limited to 'checkbox.go')
-rw-r--r--checkbox.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/checkbox.go b/checkbox.go
index 9836823..017b81a 100644
--- a/checkbox.go
+++ b/checkbox.go
@@ -30,7 +30,9 @@ func (c *Checkbox) SetText(text string) (err error) {
c.lock.Lock()
defer c.lock.Unlock()
- // TODO handle created
+ if c.created {
+ return c.sysData.setText(text)
+ }
c.initText = text
return nil
}
@@ -51,8 +53,12 @@ func (c *Checkbox) make(window *sysData) error {
c.lock.Lock()
defer c.lock.Unlock()
- return c.sysData.make(c.initText, 300, 300, window)
- // TODO size to parent size
+ err := c.sysData.make(c.initText, 300, 300, window)
+ if err != nil {
+ return err
+ }
+ c.created = true
+ return nil
}
func (c *Checkbox) setRect(x int, y int, width int, height int) error {