Remove paddings on tabview page


first of all, Great job!
I have recently started to play around with LitlevGL library and i am very hapy with it.
For now I have a very beginers question and i would appreciate if you could help me.
How can I remove paddings from a page in a tabview. I want to put an object at the 0 x-cordinate
I tryed to set padding to zero and the style to tabview but it seems i am dooing something the wrong way.

/*static lv_style_t h_style;
lv_style_copy(&h_style, &lv_style_transp);
h_style.body.padding.inner = 0; //LV_DPI / 10;
h_style.body.padding.left = 0;//LV_DPI / 4;
h_style.body.padding.right = 0;//LV_DPI / 4; = 0;//LV_DPI / 10;
h_style.body.padding.bottom = 0
lv_page_set_style(parent, LV_PAGE_STYLE_BG, &h_style);/*

I am usin a simulator in Eclipse dev. tool

If you are confident that your tabview object is at the 0 X coordinate and yet there is still padding for your tabs/data I suggest you look at all the different tabview styles you can customize. I suspect that the default style in one of these has the paddings you are trying to eliminate (specifically LV_TABVIEW_STYLE_BTN_BG).

You need to remove padding on the tab, not the tabview itself. Tabs are built by positioning page objects below the tab selector, so something like this should work:

lv_obj_t * tab = lv_tabview_add_tab(tabview, "Name");
lv_page_set_style(tab, LV_PAGE_STYLE_SCRL, &h_style);
1 Like

Ok, thank you very much, your replies and additional two ours of reading documentation cleared things up. :slight_smile: