Skip to content
rivo edited this page Dec 4, 2020 · 2 revisions

A simple Box with a title:

Code:

package main

import "github.com/rivo/tview"

func main() {
	box := tview.NewBox().
		SetBorder(true).
		SetTitle("Box Demo")
	if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil {
		panic(err)
	}
}

See also: https://pkg.go.dev/github.com/rivo/tview#Box

Clone this wiki locally