summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-18 19:01:56 -0400
committerPietro Gagliardi <[email protected]>2014-08-18 19:01:56 -0400
commitcb4d28cc1cb0e29990e0081fe1245620f3aab955 (patch)
treeb92a366a823c24a38bd3bb2f0722ed627ccbc15c /redo/zz_test.go
parentb6bf7402abe8d0d88b9db9ccf581425dfe118b2f (diff)
Added OpenFile(), the first dialog to be added, and implemented it on Windows... mostly.
Diffstat (limited to 'redo/zz_test.go')
-rw-r--r--redo/zz_test.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index 601d0ec..2477de0 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -38,6 +38,8 @@ type testwin struct {
festart Button
felabel Label
festop Button
+ openbtn Button
+ fnlabel Label
icons []icon
il ImageList
icontbl Table
@@ -89,7 +91,19 @@ func (tw *testwin) addfe() {
tw.fe = nil
}
})
- tw.festack = NewVerticalStack(tw.festart, tw.felabel, tw.festop)
+ tw.openbtn = NewButton("Open")
+ tw.openbtn.OnClicked(func() {
+ fn := OpenFile()
+ if fn == "" {
+ fn = "<no file selected>"
+ }
+ tw.fnlabel.SetText(fn)
+ })
+ tw.fnlabel = NewStandaloneLabel("<no file selected>")
+ tw.festack = NewVerticalStack(tw.festart, tw.felabel, tw.festop,
+ Space(),
+ tw.openbtn, tw.fnlabel)
+ tw.festack.SetStretchy(3)
tw.t.Append("Foreign Events", tw.festack)
}