diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-30 12:16:42 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-30 12:17:09 -0400 |
| commit | 6428b17b7f92abbb84ef61361dd9ee2a3ebcae9f (patch) | |
| tree | 19398ed7987ae93a162c3300a40b2fa416d75832 /zz_test.go | |
| parent | b28781f281a7a65a89e4d7c830c773f6382fb6fb (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.go | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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) |
