SetText sets the Button's text to text.
(text string)
| 42 | |
| 43 | // SetText sets the Button's text to text. |
| 44 | func (b *Button) SetText(text string) { |
| 45 | ctext := C.CString(text) |
| 46 | C.uiButtonSetText(b.b, ctext) |
| 47 | freestr(ctext) |
| 48 | } |
| 49 | |
| 50 | // OnClicked registers f to be run when the user clicks the Button. |
| 51 | // Only one function can be registered at a time. |