SetText updates the text to s if it does not already contain s. Updating the text will clear the selection unless the selectable already contains s.
(s string)
| 157 | // SetText updates the text to s if it does not already contain s. Updating the |
| 158 | // text will clear the selection unless the selectable already contains s. |
| 159 | func (l *Selectable) SetText(s string) { |
| 160 | l.initialize() |
| 161 | if l.lastValue != s { |
| 162 | l.source = newStringSource(s) |
| 163 | l.lastValue = s |
| 164 | l.text.SetSource(l.source) |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | // Truncated returns whether the text has been truncated by the text shaper to |
| 169 | // fit within available constraints. |
nothing calls this directly
no test coverage detected