Description
Hi Team,
How to increase height of each button in list and how to increase text size in each button in list
What MCU/Processor/Board and compiler are you using?
ARM
What LVGL version are you using?
Version7
Hi Team,
How to increase height of each button in list and how to increase text size in each button in list
ARM
Version7
I believe you would change the padding on the buttons.
You would change the font on the buttons. In both cases this would be done using a style.
You need to change vertical fit property of the button to NONE, then you can set height as normal.
/*Create a list*/
lv_obj_t * list1 = lv_list_create(lv_scr_act(), NULL);
lv_obj_set_size(list1, 160, 200);
lv_obj_align(list1, NULL, LV_ALIGN_CENTER, 0, 0);
/*Add buttons to the list*/
lv_obj_t * list_btn = lv_list_add_btn(list1, LV_SYMBOL_FILE, "New");
lv_btn_set_fit2(list_btn, LV_FIT_PARENT, LV_FIT_NONE);
lv_obj_set_height(list_btn, BUTTON_HEIGHT);
lv_obj_set_style_local_text_font(list_btn, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, >YOUR_FONT_HERE<);