Description
I have a number of objects on a tabview, I would like to pad the last one so it doesnt butt up against my footer.
What MCU/Processor/Board and compiler are you using?
simulator/framebuffer
What LVGL version are you using?
8.1
What do you want to achieve?
Per description
What have you tried so far?
Padding the object but thats for the inner components
Code to reproduce
lv_obj_t * createPage(lv_obj_t * parent, int x, int y, char* title)
{
/*Create a page*/
lv_obj_t * page = lv_obj_create(parent);
lv_obj_set_size(page, 330, 225);
lv_obj_align_to(page, parent, LV_ALIGN_TOP_LEFT, x, y);
lv_obj_set_style_pad_top(page, 0, LV_PART_MAIN);
lv_obj_set_style_pad_bottom(page, 10, LV_PART_MAIN);
lv_obj_set_style_pad_left(page, 0, LV_PART_MAIN);
lv_obj_set_style_pad_right(page, 0, LV_PART_MAIN);
/*Create a label on the page*/
lv_obj_t * label = lv_label_create(page);
lv_label_set_text(label, title);
lv_obj_align_to(label, page, LV_ALIGN_TOP_MID, 0, 5);
lv_obj_set_style_pad_top(label, 0, LV_PART_MAIN);
lv_obj_set_style_pad_bottom(label, 0, LV_PART_MAIN);
lv_obj_set_style_pad_left(label, 0, LV_PART_MAIN);
lv_obj_set_style_pad_right(label, 0, LV_PART_MAIN);
return page;
}