(label string, options []string, initialOption int, selected func(option string, optionIndex int))
| 184 | } |
| 185 | |
| 186 | func (f *XForm) AddDropDown(label string, options []string, initialOption int, selected func(option string, optionIndex int)) *XForm { |
| 187 | dropdown := tview.NewDropDown() |
| 188 | dropdown. |
| 189 | SetFieldBackgroundColor(DefaultTheme.FieldBackgroundColor). |
| 190 | SetLabel(label). |
| 191 | SetOptions(options, selected). |
| 192 | SetCurrentOption(initialOption) |
| 193 | |
| 194 | f.AddFormItem(dropdown) |
| 195 | |
| 196 | return f |
| 197 | } |
| 198 | |
| 199 | func (f *XForm) AddCheckbox(label string, checked bool, changed func(checked bool)) *XForm { |
| 200 | f.AddFormItem( |
no outgoing calls
no test coverage detected