Terminal-based user interface toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
956 B

// Demo code for the Frame primitive.
package main
import (
func main() {
app := cview.NewApplication()
box := cview.NewBox()
frame := cview.NewFrame(box)
frame.SetBorders(2, 2, 2, 2, 4, 4)
frame.AddText("Header left", true, cview.AlignLeft, tcell.ColorWhite.TrueColor())
frame.AddText("Header middle", true, cview.AlignCenter, tcell.ColorWhite.TrueColor())
frame.AddText("Header right", true, cview.AlignRight, tcell.ColorWhite.TrueColor())
frame.AddText("Header second middle", true, cview.AlignCenter, tcell.ColorRed.TrueColor())
frame.AddText("Footer middle", false, cview.AlignCenter, tcell.ColorGreen.TrueColor())
frame.AddText("Footer second middle", false, cview.AlignCenter, tcell.ColorGreen.TrueColor())
app.SetRoot(frame, true)
if err := app.Run(); err != nil {