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

Method AddPasswordField

tui/theme.go:170–184  ·  view source on GitHub ↗
(label, value string, fieldWidth int, mask rune, changed func(text string))

Source from the content-addressed store, hash-verified

168}
169
170func (f *XForm) AddPasswordField(label, value string, fieldWidth int, mask rune, changed func(text string)) *XForm {
171 if mask == 0 {
172 mask = '*'
173 }
174
175 f.AddFormItem(tview.NewInputField().
176 SetFieldTextColor(tcell.ColorBlack).
177 SetLabel(label).
178 SetText(value).
179 SetFieldWidth(fieldWidth).
180 SetMaskCharacter(mask).
181 SetChangedFunc(changed))
182
183 return f
184}
185
186func (f *XForm) AddDropDown(label string, options []string, initialOption int, selected func(option string, optionIndex int)) *XForm {
187 dropdown := tview.NewDropDown()

Callers 2

openPasswordChangeFormFunction · 0.80
openConfigFormFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected