|
FabGL
ESP32 Display Controller and Graphics Library
|
| void fabgl::LineEditor::setText | ( | char const * | text, |
| bool | moveCursor = true |
||
| ) |
Sets initial text.
Call this method if the input must have some text already inserted. This method can be also called during editing to replace current text.
| text | Initial text. |
| moveCursor | If true the cursor is moved at the end of initial text. |
Example:
LineEditor ed(&Terminal);
ed.setText("Initial text ");
char * txt = ed.get();
Terminal.printf("Your input is: %s\r\n", txt);