MCPcopy Create free account
hub / github.com/Macmod/godap / AddTextView

Method AddTextView

tui/theme.go:112–126  ·  view source on GitHub ↗
(label, text string, fieldWidth, fieldHeight int, dynamicColors, scrollable bool)

Source from the content-addressed store, hash-verified

110}
111
112func (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
128func (f *XForm) AddInputField(label, value string, fieldWidth int, accept func(textToCheck string, lastChar rune) bool, changed func(text string)) *XForm {
129 inputField := tview.NewInputField()

Callers 9

handleAttrsKeyCtrlEFunction · 0.95
handleAttrsKeyCtrlNFunction · 0.95
openActionNodeFormFunction · 0.95
loadChangeOwnerFormFunction · 0.95
openUpdateUacFormFunction · 0.95
openPasswordChangeFormFunction · 0.95
openMoveObjectFormFunction · 0.95
openAddMemberToGroupFormFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected