summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-14 15:00:59 -0500
committerPietro Gagliardi <[email protected]>2014-02-14 15:00:59 -0500
commit681afdf0adfc42c64cf5dd898ec17988a31f9cb7 (patch)
treeeb4c357433cb361db4f5328a1b3fb058feab5d86 /main.go
parentfbba8a581c1f0af9bc26baec02552f3453bca8f8 (diff)
Added LineEdit.
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.go b/main.go
index 81e48fa..e541bd4 100644
--- a/main.go
+++ b/main.go
@@ -12,7 +12,8 @@ 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!")
- s := NewStack(Vertical, b, c, cb1, cb2)
+ e := NewLineEdit("Enter text here too")
+ s := NewStack(Vertical, b, c, cb1, cb2, e)
err := w.Open(s)
if err != nil {
panic(err)
@@ -32,7 +33,11 @@ mainloop:
if err != nil {
panic(err)
}
- err = w.SetTitle(fmt.Sprintf("%v | %s | %s", c.Checked(), cs1, cs2))
+ et, err := e.Text()
+ if err != nil {
+ panic(err)
+ }
+ err = w.SetTitle(fmt.Sprintf("%v | %s | %s | %s", c.Checked(), cs1, cs2, et))
if err != nil {
panic(err)
}