cview/demos/checkbox/main.go

22 lines
364 B
Go

// Demo code for the CheckBox primitive.
package main
import (
"code.rocketnine.space/tslocum/cview"
)
func main() {
app := cview.NewApplication()
defer app.HandlePanic()
app.EnableMouse(true)
checkbox := cview.NewCheckBox()
checkbox.SetLabel("Hit Enter to check box: ")
app.SetRoot(checkbox, true)
if err := app.Run(); err != nil {
panic(err)
}
}