summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-15 18:27:34 -0500
committerPietro Gagliardi <[email protected]>2014-02-15 18:27:34 -0500
commit2d97a2446304daa1d57121d13143cce2ceaf69a3 (patch)
tree920a6b86d1f405af0ed9e1b0953e50f3ad9f9bad /main.go
parent8be17f087b0cb1706df837b3f956dcca2ced4568 (diff)
Added Combobox.SelectedIndex().
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.go b/main.go
index 49ff4f1..c110e99 100644
--- a/main.go
+++ b/main.go
@@ -16,7 +16,9 @@ func main() {
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, s2, c, cb1, cb2, e, l)
+ b3 := NewButton("List Info")
+ s3 := NewStack(Horizontal, l, b3)
+ s0 := NewStack(Vertical, s2, c, cb1, cb2, e, s3)
lb := NewListbox(true, "Select One", "Or More", "To Continue")
lb2 := NewListbox(false, "Select", "Only", "One", "Please")
i := 0
@@ -55,6 +57,11 @@ mainloop:
cb2.Delete(2)
lb.Delete(3)
lb2.Delete(4)
+ case <-b3.Clicked:
+ MsgBox("List Info",
+ "cb1: %d %q\ncb2: %d %q",
+ cb1.SelectedIndex(), cb1.Selection(),
+ cb2.SelectedIndex(), cb2.Selection())
}
}
w.Hide()