summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-15 17:59:12 -0500
committerPietro Gagliardi <[email protected]>2014-02-15 17:59:12 -0500
commit3c25b58652b55ee27a8c3c1f09e88a1eb593ca39 (patch)
tree7f1bbbc1e182c7d6c9826867a9dfcae8d2f35867 /main.go
parentca1c5131593442a8bbf2f81caa989d54cab885aa (diff)
Added Listbox.Append() and Listbox.InsertBefore().
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.go b/main.go
index 3e87fd1..ce773ed 100644
--- a/main.go
+++ b/main.go
@@ -12,18 +12,20 @@ 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!")
+ e := NewLineEdit("Enter text here too")
+ l := NewLabel("This is a label")
+ s0 := NewStack(Vertical, b, c, cb1, cb2, e, l)
+ lb := NewListbox(true, "Select One", "Or More", "To Continue")
+ lb2 := NewListbox(false, "Select", "Only", "One", "Please")
i := 0
doAdjustments := func() {
cb1.Append("append")
cb2.InsertBefore(fmt.Sprintf("before %d", i), 1)
+ lb.InsertBefore(fmt.Sprintf("%d", i), 2)
+ lb2.Append("Please")
i++
}
doAdjustments()
- e := NewLineEdit("Enter text here too")
- l := NewLabel("This is a label")
- s0 := NewStack(Vertical, b, c, cb1, cb2, e, l)
- lb := NewListbox(true, "Select One", "Or More", "To Continue")
- lb2 := NewListbox(false, "Select", "Only", "One", "Please")
s1 := NewStack(Vertical, lb2, lb)
s := NewStack(Horizontal, s1, s0)
err := w.Open(s)