1
0
mirror of https://github.com/rivo/tview.git synced 2025-04-26 13:49:06 +08:00
tview/demos/checkbox/main.go
2018-01-03 21:13:32 +01:00

13 lines
298 B
Go

// Demo code for the Checkbox primitive.
package main
import "github.com/rivo/tview"
func main() {
app := tview.NewApplication()
checkbox := tview.NewCheckbox().SetLabel("Hit Enter to check box: ")
if err := app.SetRoot(checkbox, true).SetFocus(checkbox).Run(); err != nil {
panic(err)
}
}