From 9da1e956b9a8fff52f41b839eb50c109dc5a3e99 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 12 Dec 2015 20:15:14 -0500 Subject: Added Box. Phew! Now to port over the libui test program... --- zz_test.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'zz_test.go') diff --git a/zz_test.go b/zz_test.go index cc5ff74..cd9cac5 100644 --- a/zz_test.go +++ b/zz_test.go @@ -11,12 +11,16 @@ func TestIt(t *testing.T) { Quit() return true }) - t := NewTab() - w.SetChild(t) + b := NewVerticalBox() + w.SetChild(b) w.SetMargined(true) - t.Append("First Page", NewButton("Click Me")) - t.Append("Second Page", NewButton("Click Me Too")) - t.SetMargined(0, true) + button := NewButton("Click Me") + button.OnClicked(func(*Button) { + b.SetPadded(!b.Padded()) + }) + b.Append(button, true) + b.Append(NewButton("Button 2"), false) + b.Append(NewButton("Button 3"), true) w.Show() }) if err != nil { -- cgit v1.2.3