Description
I want to stop the textarea from automatically scrolling when I add text.
What MCU/Processor/Board and compiler are you using?
PSoC 5LP with the PSoC Creator IDE
What do you want to achieve?
I’m receiving text from a UART and appending it to a textarea using lv_ta_add_text. I have a Scroll Up and Scroll Down button that the user can press to scroll through the textarea (when the user presses the buttons, I call lv_page_scroll_ver).
But if the user scrolls up to look at text that was received a while ago, then more text comes in, my call to lv_ta_add_text will cause the textarea to jump back down to the bottom. I would like to disable that, so that if the user is scrolling up and new text comes in, he doesn’t lose his place.
What have you tried so far?
When the user scrolls up and new UART text comes in, I could just hold onto it and not call lv_ta_add_text until the user scrolls back down. But if I do that, scrolling down won’t work smoothly: the user will scroll down line by line to the bottom of the textarea, I’ll add the received text, and the textarea will jump to the end of the received text, which could be many lines. So he was scrolling a line at a time, then suddenly there was a big jump.
Is there any solution to this?
Thank you.