(label, text string, fieldWidth, fieldHeight int, dynamicColors, scrollable bool)
| 110 | } |
| 111 | |
| 112 | func (f *XForm) AddTextView(label, text string, fieldWidth, fieldHeight int, dynamicColors, scrollable bool) *XForm { |
| 113 | if fieldHeight == 0 { |
| 114 | fieldHeight = tview.DefaultFormFieldHeight |
| 115 | } |
| 116 | |
| 117 | textView := tview.NewTextView() |
| 118 | f.AddFormItem(textView. |
| 119 | SetLabel(label). |
| 120 | SetSize(fieldHeight, fieldWidth). |
| 121 | SetDynamicColors(dynamicColors). |
| 122 | SetScrollable(scrollable). |
| 123 | SetText(text)) |
| 124 | |
| 125 | return f |
| 126 | } |
| 127 | |
| 128 | func (f *XForm) AddInputField(label, value string, fieldWidth int, accept func(textToCheck string, lastChar rune) bool, changed func(text string)) *XForm { |
| 129 | inputField := tview.NewInputField() |
no outgoing calls
no test coverage detected