Description
I have a footer, it contains 2 rows of text but there is a scrollbar that I dont want. How do I remove it?
What MCU/Processor/Board and compiler are you using?
Simulator
What LVGL version are you using?
8.1
What do you want to achieve?
Remove the scroll bar/prevent scrolling
What have you tried so far?
Code to reproduce
void footer_create(void)
{
footer = lv_obj_create(lv_disp_get_scr_act(NULL));
lv_obj_set_pos(footer, 0, 535);
lv_obj_set_width(footer, lv_disp_get_hor_res(NULL));
lv_obj_set_height(footer, 63);
/*IP Address*/
lbl_ipAddress = lv_label_create(footer);
lv_obj_align(lbl_ipAddress, LV_ALIGN_TOP_LEFT, 0, -15);
lv_label_set_text(lbl_ipAddress, "192.168.0.??");
char * ipAddress = malloc(16);
printf("Get IP\n");
getIP(ipAddress);
lv_label_set_text(lbl_ipAddress, ipAddress);
free(ipAddress);
/*Uptime*/
printf("Set Uptime\n");
uptime = lv_label_create(footer);
lv_label_set_text(uptime, "Uptime: ");
lv_obj_align(uptime, LV_ALIGN_TOP_LEFT, 0, 5);
lv_obj_set_style_pad_bottom(uptime, 0, LV_PART_MAIN);
/*Outsde temp*/
printf("Outside temp\n");
lblFooterOSTemp = lv_label_create(footer);
lv_obj_align(lblFooterOSTemp, LV_ALIGN_TOP_RIGHT, -45, -15);
lv_label_set_text(lblFooterOSTemp, "");
lv_obj_add_flag(lblFooterOSTemp, false);
lv_label_set_recolor(lblFooterOSTemp, true);
if(TempEnabled) {
lbl_temp = lv_label_create(footer);
lv_label_set_text(lbl_temp, "");
// lv_obj_align(lbl_temp, NULL, LV_ALIGN_IN_TOP_RIGHT, -70, 25);
lv_obj_align(lbl_temp, LV_ALIGN_TOP_RIGHT, -5, 5);
lv_label_set_recolor(lbl_temp, true);
}
// lv_cont_set_fit2(footer, LV_FIT_NONE, LV_FIT_TIGHT); /*Let the height set automatically*/
printf("Footer created\n");
}
Screenshot and/or video
Thanks!