...

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

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

     1  // Demo code for the Box primitive.
     2  package main
     3  
     4  import (
     5  	"github.com/gdamore/tcell/v2"
     6  	"github.com/rivo/tview"
     7  )
     8  
     9  func main() {
    10  	box := tview.NewBox().
    11  		SetBorder(true).
    12  		SetBorderAttributes(tcell.AttrBold).
    13  		SetTitle("A [red]c[yellow]o[green]l[darkcyan]o[blue]r[darkmagenta]f[red]u[yellow]l[white] [black:red]c[:yellow]o[:green]l[:darkcyan]o[:blue]r[:darkmagenta]f[:red]u[:yellow]l[white:] [::bu]title")
    14  	if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil {
    15  		panic(err)
    16  	}
    17  }
    18  

View as plain text