summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-11 10:10:10 -0400
committerPietro Gagliardi <[email protected]>2014-06-11 10:10:10 -0400
commita7747b95a4fe6d1a76d34e888eef24ad18a27414 (patch)
treec116862e802b6a7f8ca6caa70579184af29e8409
parentd14ee7f3ddc76755495b42730124f8c1be66dd15 (diff)
Added Window.Center() test to the test program.
-rw-r--r--test/main.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/main.go b/test/main.go
index b39829b..d2c21d1 100644
--- a/test/main.go
+++ b/test/main.go
@@ -351,11 +351,16 @@ func myMain() {
dialog_bMsgBox := NewButton("MsgBox()")
dialog_bMsgBoxError := NewButton("MsgBoxError()")
+ centerButton := NewButton("Center")
dialog_win := NewWindow("Dialogs", 200, 200)
if *dialogTest {
- dialog_win.Open(NewVerticalStack(
+ s := NewVerticalStack(
dialog_bMsgBox,
- dialog_bMsgBoxError))
+ dialog_bMsgBoxError,
+ Space(),
+ centerButton)
+ s.SetStretchy(2)
+ dialog_win.Open(s)
}
var dialog_sret chan struct{} = nil
@@ -435,6 +440,8 @@ _=curtime
case <-dialog_sret:
dialog_sret = nil
resetl()
+ case <-centerButton.Clicked:
+ dialog_win.Center()
}
}
w.Hide()