How to stop this from moving?

Description

My issue is that the textarea moves up or down whenever I click on it or update its value using lv_textarea_set_text, like in the gif attached below.
The textarea was generated using Gui Guider v 1.6

What MCU/Processor/Board and compiler are you using?

MIMXRT1170-EVK

What LVGL version are you using?

v8.3.5

What do you want to achieve?

Stop the text from moving every time it changes value

What have you tried so far?

clearing flag LV_OBJ_FLAG_SCROLLABLE and LV_OBJ_FLAG_SCROLL_ELASTIC using lv_obj_clear_flag

Code to reproduce

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.
label_text_movin_1
label_text_movin_2

Finally found the answer. A text area is by default a multi line, so just use lv_textarea_set_one_line and this should fix it.

2 Likes