summaryrefslogtreecommitdiff
path: root/zz_test.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-30 12:16:42 -0400
committerPietro Gagliardi <[email protected]>2014-10-30 12:17:09 -0400
commit6428b17b7f92abbb84ef61361dd9ee2a3ebcae9f (patch)
tree19398ed7987ae93a162c3300a40b2fa416d75832 /zz_test.go
parentb28781f281a7a65a89e4d7c830c773f6382fb6fb (diff)
Started fleshing out the Spinbox interface. Added Value() and SetValue(); implemented on GTK+. Added min and max to the constructor; implemented on GTK+.
Diffstat (limited to 'zz_test.go')
-rw-r--r--zz_test.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/zz_test.go b/zz_test.go
index c7f864a..afe3c04 100644
--- a/zz_test.go
+++ b/zz_test.go
@@ -149,9 +149,18 @@ func (tw *testwin) addfe() {
tw.openbtn, tw.fnlabel)
tw.festack.SetStretchy(4)
tw.festack.SetStretchy(6)
- tw.festack2 = newVerticalStack(NewSpinbox(), Space(), NewTextbox())
- tw.festack2.SetStretchy(1)
- tw.festack2.SetStretchy(2)
+ sb := NewSpinbox(0, 100)
+ cbutton := NewButton("Set to Invalid Low")
+ cbutton.OnClicked(func() {
+ sb.SetValue(-500)
+ })
+ dbutton := NewButton("Set to Invalid High")
+ dbutton.OnClicked(func() {
+ sb.SetValue(500)
+ })
+ tw.festack2 = newVerticalStack(sb, cbutton, dbutton, Space(), NewTextbox())
+ tw.festack2.SetStretchy(3)
+ tw.festack2.SetStretchy(4)
tw.festack = newHorizontalStack(tw.festack, tw.festack2)
tw.festack.SetStretchy(0)
tw.festack.SetStretchy(1)