diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-25 17:34:45 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-25 17:34:45 -0400 |
| commit | 4680e35300544a90d5426cbf44b4c533fa025105 (patch) | |
| tree | 3242d6b03f2171d7090fd3a6e8383be99867f43f /redo/zz_test.go | |
| parent | d03b8f4b7ce5cc04753679798e14233135026a25 (diff) | |
Simplified the control nesting model by removing Control.unparent() and requiring all Windows to have a Control at construct time; implemented such on Windows.
Diffstat (limited to 'redo/zz_test.go')
| -rw-r--r-- | redo/zz_test.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go index 884d1d0..e7a48e7 100644 --- a/redo/zz_test.go +++ b/redo/zz_test.go @@ -18,13 +18,8 @@ func init() { go func() { done := make(chan struct{}) Do(func() { - w := NewWindow("Hello", 320, 240) - b := NewButton("There") t := NewTab() - w.SetControl(t) - if *closeOnClick { - b.SetText("Click to Close") - } + w := NewWindow("Hello", 320, 240, t) w.OnClosing(func() bool { if *closeOnClick { panic("window closed normally in close on click mode (should not happen)") @@ -34,6 +29,10 @@ func init() { done <- struct{}{} return true }) + b := NewButton("There") + if *closeOnClick { + b.SetText("Click to Close") + } // GTK+ TODO: this is causing a resize event to happen afterward?! b.OnClicked(func() { println("in OnClicked()") @@ -45,10 +44,10 @@ func init() { }) t.Append("Button", b) c := NewCheckbox("You Should Now See Me Instead") - t.Append("Checkbox", c) c.OnClicked(func() { w.SetTitle(fmt.Sprint(c.Checked())) }) + t.Append("Checkbox", c) w.Show() }) <-done |
