cview/demos/checkbox/main.go

20 lines
338 B
Go
Raw Normal View History

2020-04-26 23:55:45 +00:00
// Demo code for the CheckBox primitive.
2017-12-27 15:05:00 +00:00
package main
import (
"code.rocketnine.space/tslocum/cview"
)
2017-12-27 15:05:00 +00:00
func main() {
app := cview.NewApplication()
app.EnableMouse(true)
checkbox := cview.NewCheckBox()
checkbox.SetLabel("Hit Enter to check box: ")
app.SetRoot(checkbox, true)
if err := app.Run(); err != nil {
2017-12-27 15:05:00 +00:00
panic(err)
}
}