From cb4d28cc1cb0e29990e0081fe1245620f3aab955 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 18 Aug 2014 19:01:56 -0400 Subject: Added OpenFile(), the first dialog to be added, and implemented it on Windows... mostly. --- redo/zz_test.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'redo/zz_test.go') 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 = "" + } + tw.fnlabel.SetText(fn) + }) + tw.fnlabel = NewStandaloneLabel("") + 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) } -- cgit v1.2.3