Hi @kisvegabor , @embeddedt
Description
I want to display a text about 30k characters.
Then test with sample in Page (lv_page) — LVGL documentation
My screen cant not touch, just use event up/down which receive from spi transfer.
What LVGL version are you using?
LVGL 7.10.1
What do you want to achieve?
- How do I scroll text from beginning to the end or vice versa step by step when up-up-… or down-down-…?
- Can color, size of the scroll bar be changed?
- For long text, just set LV_LABEL_LONG_TXT_HINT to 1 in lv_conf.h, is it right?
Do I need to do anything else?
Code to reproduce
void lv_ex_page_1(void)
{
/*Create a page*/
lv_obj_t * page = lv_page_create(lv_scr_act(), NULL);
lv_obj_set_size(page, 150, 200);
lv_obj_align(page, NULL, LV_ALIGN_CENTER, 0, 0);
/*Create a label on the page*/
lv_obj_t * label = lv_label_create(page, NULL);
lv_label_set_long_mode(label, LV_LABEL_LONG_BREAK); /*Automatically break long lines*/
lv_obj_set_width(label, lv_page_get_width_fit(page)); /*Set the label width to max value to not show hor. scroll bars*/
lv_label_set_text(label, "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n"
"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n"
"Ut enim ad minim veniam, quis nostrud exercitation ullamco\n"
"laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure\n"
"dolor in reprehenderit in voluptate velit esse cillum dolore\n"
"eu fugiat nulla pariatur.\n"
"Excepteur sint occaecat cupidatat non proident, sunt in culpa\n"
"qui officia deserunt mollit anim id est laborum.");
}