How to bottom left/right align on tabview without scrollbar

Description

I want to bottom align a button on a tabview without showing the scrollbar.

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

ESP32 / ILI9341 / PlatformIO

What LVGL version are you using?

7.8.1

What do you want to achieve?

I want to be able to bottom left/right align the proper lvgl way without seeing scrollbars

What have you tried so far?

  1. Trying to understand containers, but as far as I can see it does not support bottom allign.
  2. I could offset the x/y with some value while calling the align function like 15px but that seems like a hack.

Code to reproduce

void demo_create(void) {
    lv_obj_t* tabview  = lv_tabview_create(lv_scr_act(), NULL);
    lv_obj_t* tab1 = lv_tabview_add_tab(tabview, "Tab");
    lv_obj_t * label;
    
    lv_obj_t* btn1 = lv_btn_create(tab1, NULL);
    label = lv_label_create(btn1, NULL);
    lv_obj_set_width(btn1, 90);
    lv_label_set_text(label, "Left");

    lv_obj_t* btn2 = lv_btn_create(tab1, btn1);
    label = lv_label_create(btn2, NULL);
    lv_label_set_text(label, "Right");

    lv_obj_align(btn1, tab1,  LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
    lv_obj_align(btn2, tab1,  LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
}

It looks like that LV_ALIGN_IN_XXX for tabview ignores any padding and this the tabview shows the scrollbar because it things an object is outside.

Screenshot and/or video

image

That’s correct.

May I ask why you are trying to align the buttons on the tabview itself instead of aligning them to the parent object?

My reasoning was that if I put an object on a tabview I should beable to align on it correctly.

Align on parent does not help in this case (tried it) it would still show the scrollbar.

I was reading at the forum that disabling the scroll bar is not the right solution aswell because the idea is that a tabview can be scrollable if the content is to big for the view.

What would be the correct LVGL way to bottom align to buttons?