SetSelectedFunc sets the callback for when the button is pressed.
(handler func())
| 159 | |
| 160 | // SetSelectedFunc sets the callback for when the button is pressed. |
| 161 | func (b *FormButton) SetSelectedFunc(handler func()) *FormButton { |
| 162 | b.selected = handler |
| 163 | b.button.SetSelectedFunc(handler) |
| 164 | return b |
| 165 | } |
| 166 | |
| 167 | // SetDisabled sets whether the button is disabled. |
| 168 | func (b *FormButton) SetDisabled(disabled bool) tview.FormItem { |
no outgoing calls
no test coverage detected