textarea and label

What do you want to achieve?

What have you tried so far?

Screenshot or video

Hello, I can display the data entered from the keyboard on the textarea. I would like to see the data I enter from the keyboard into the textarea on a label, can you help me?


  • SquareLine Studio version:
  • Operating system:
  • Target hardware:


You need 2 functions:

//Example: this is the loop for calling lv_timer_handler:
while (1) {
//In this line you can set the “ui_your_Label_name” value from “ui_your_TextArea_name”
lv_label_set_text(ui_your_Label_name, lv_textarea_get_text(ui_your_TextArea_name));

Have a good work

Thanks for the detailed answer Viti. I would only add that you can do the text-copying/setting even in a VALUE_CHANGED event of the textarea-widget instead of continuous call to lv_label_set_text, to probably save some CPU-resources, especially if the text is large. (I guess LVGL only updates the graphic for the text area when it actually changes, so it only performs an internal copying in other cases. With the other event-based solution maybe an initial explicit copying would be needed to update the label for the first time.)