SetText sets the [FuncButton.Text] and updates the tooltip to correspond to the new name.
(v string)
| 162 | // SetText sets the [FuncButton.Text] and updates the tooltip to |
| 163 | // correspond to the new name. |
| 164 | func (fb *FuncButton) SetText(v string) *FuncButton { |
| 165 | ptext := fb.Text |
| 166 | fb.Text = v |
| 167 | if fb.typesFunc != nil && fb.Text != ptext && ptext != "" { |
| 168 | fb.typesFunc.Doc = types.FormatDoc(fb.typesFunc.Doc, ptext, fb.Text) |
| 169 | fb.SetTooltip(fb.typesFunc.Doc) |
| 170 | } |
| 171 | return fb |
| 172 | } |
| 173 | |
| 174 | // SetFunc sets the function associated with the FuncButton to the |
| 175 | // given function or method value. For documentation information for |
no test coverage detected