Description
When a page has height is 240 px,
and it has 5 child-containers (eash height is 70px)
that total of these containers is more than the page’s height
( 5x70 = 350px …more than the page’s height 240px).
I would like to move the view of the page to the lower container.
How to set the view of this page to the bottom?
Thank you.
What MCU/Processor/Board and compiler are you using?
- ESP32
What do you want to achieve?
As the description.
What have you tried so far?
Code to reproduce
lv_obj_t* page = lv_page_create(lv_scr_act(), NULL);
lv_obj_set_size(page,240,240);
lv_page_set_scrl_layout(page, LV_LAYOUT_COL_M);
lv_page_set_sb_mode(page, LV_SB_MODE_AUTO);
static lv_style_t page_style;
lv_style_copy(&page_style, &lv_style_plain);
lv_page_set_style(page, LV_PAGE_STYLE_SCRL, &page_style);
page_style.body.padding.inner = 0;
page_style.body.padding.top = 0;
page_style.body.padding.bottom = 0;
page_style.body.padding.left = 0;
page_style.body.padding.right = 0;
for(int i=0; i < 5; i++ ) {
lv_obj_t* cont = lv_cont_create(page, NULL);
lv_obj_set_size(cont,240,70);
lv_obj_set_parent_event(cont, true);
lv_obj_set_drag_parent(cont, true);
}