...

Source file src/github.com/rivo/tview/demos/checkbox/main.go

Documentation: github.com/rivo/tview/demos/checkbox

     1  // Demo code for the Checkbox primitive.
     2  package main
     3  
     4  import "github.com/rivo/tview"
     5  
     6  func main() {
     7  	app := tview.NewApplication()
     8  	checkbox := tview.NewCheckbox().SetLabel("Hit Enter to check box: ")
     9  	if err := app.SetRoot(checkbox, true).EnableMouse(true).Run(); err != nil {
    10  		panic(err)
    11  	}
    12  }
    13  

View as plain text