Set scroll of a object to the bottom

How can i modify de position of the scroll?

ESP32

LVGL v8.0

It seems that the scroll is always pointed at the top of the object. I need to do the oposite. i am filling a object with labels (a system log) ordered from top to bottom from older to younger, younger at the bottom. What i need is to point the scroll allways at the bottom, every time the parent object grows with a new child.

I haven’t tried anything yet because a i haven’t find anything in the docs. There is similar topics in the forum but the solutions are for older versions

Thanks for your time!!

If I’m understanding correctly, it sounds like lv_obj_scroll_to_y(obj, <y_coord>, LV_ANIM_OFF) is what you want. I think (though I haven’t tested) that you can pass LV_COORD_MAX to scroll to the bottom.

You would want to invoke that after appending more content to the object.

It may also be necessary to call lv_obj_update_layout(obj) before scrolling; I’m not 100% sure.

Hi embeddedt!!!

thanks for the answer. Yes " lv_obj_scroll_to_y" is exactly what a need. I was a bit blind searching in the doc… I’m very grateful

P.D. Is no necesary to use v_obj_update_layout

RECTIFICATION

it is necessary to use the function lv_obj_update_layout