Newer
Older
package views
import (
"github.com/gdamore/tcell"
"github.com/rivo/tview"
)
type ResultAndInputView struct {
resultAndInputView *tview.TextView
}
func NewResultAndInputView() *ResultAndInputView {
SetDynamicColors(true).
SetRegions(true).
SetScrollable(true).
SetTitle("Result").
SetBorder(true).
SetBorderColor(tcell.ColorSteelBlue)
func (rv *ResultAndInputView) GetContent() tview.Primitive {
return rv.resultAndInputView
func (rv *ResultAndInputView) SetContent(s string) {
rv.resultAndInputView.Clear()
rv.resultAndInputView.SetText(s)