From 8c30cae462e7be26ec51a726c583255b9bcc304a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 15 Feb 2014 17:52:33 -0500 Subject: Added Combobox.Append() and Combobox.InsertBefore(). --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index e02adc5..3e87fd1 100644 --- a/main.go +++ b/main.go @@ -12,6 +12,13 @@ func main() { c := NewCheckbox("Check Me") cb1 := NewCombobox(true, "You can edit me!", "Yes you can!", "Yes you will!") cb2 := NewCombobox(false, "You can't edit me!", "No you can't!", "No you won't!") + i := 0 + doAdjustments := func() { + cb1.Append("append") + cb2.InsertBefore(fmt.Sprintf("before %d", i), 1) + i++ + } + doAdjustments() e := NewLineEdit("Enter text here too") l := NewLabel("This is a label") s0 := NewStack(Vertical, b, c, cb1, cb2, e, l) @@ -38,6 +45,7 @@ mainloop: if err != nil { panic(err) } + doAdjustments() } } w.Hide() -- cgit v1.2.3