summaryrefslogtreecommitdiff
path: root/test/main.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-26 21:36:46 -0400
committerPietro Gagliardi <[email protected]>2014-06-26 21:36:46 -0400
commit098beef9969ae625714de4a23c5899a70a6557ca (patch)
tree2957aad1e707be9cba02c45f7f15dce78546d2ac /test/main.go
parent5c002e3d0f0b873d6ca29dfa9e97c09dead54494 (diff)
Added Checkbox.SetChecked() and implemented it on GTK+.
Diffstat (limited to 'test/main.go')
-rw-r--r--test/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/main.go b/test/main.go
index 68f3463..034d712 100644
--- a/test/main.go
+++ b/test/main.go
@@ -34,6 +34,7 @@ func gridWindow() *Window {
b12 := NewButton("1,2")
l20 := NewLabel("2,0")
c21 := NewCheckbox("2,1")
+ c21.SetChecked(true)
l22 := NewLabel("2,2")
g := NewGrid(3,
b00, b01, b02,
@@ -43,6 +44,10 @@ func gridWindow() *Window {
g.SetStretchy(1, 1)
w.SetSpaced(*spacingTest)
w.Open(g)
+ go func() {for {select {
+ case <-b12.Clicked:
+ c21.SetChecked(!c21.Checked())
+ }}}()
return w
}