From 6428b17b7f92abbb84ef61361dd9ee2a3ebcae9f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 30 Oct 2014 12:16:42 -0400 Subject: Started fleshing out the Spinbox interface. Added Value() and SetValue(); implemented on GTK+. Added min and max to the constructor; implemented on GTK+. --- zz_test.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'zz_test.go') 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) -- cgit v1.2.3