Text returns the current text of the text field. It applies any unapplied changes first, and sends an [events.Change] event if applicable. This is the main end-user method to get the current value of the text field.
()
| 446 | // first, and sends an [events.Change] event if applicable. This is the main end-user |
| 447 | // method to get the current value of the text field. |
| 448 | func (tf *TextField) Text() string { |
| 449 | tf.editDone() |
| 450 | return tf.text |
| 451 | } |
| 452 | |
| 453 | // SetText sets the text of the text field and reverts any current edits |
| 454 | // to reflect this new text. |