Important: unclear posts may not receive useful answers.
Before posting
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
master
branch.- Be sure you have checked the relevant part of the documentation.
- If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
Description
What MCU/Processor/Board and compiler are you using?
What LVGL version are you using?
v8.1
What do you want to achieve?
i want to change the color of the list button
What have you tried so far?
i tried lv_obj_set_style_bg_color to change, but the color is not filled the whole button, the purple is always shorter
his_data_objs[i] = lv_list_add_btn(list, NULL, “btn”);
lv_obj_set_style_bg_color(his_data_objs[i], lv_color_make(0x80, 0x80, 0xD0), LV_PART_MAIN);
like this, i hope the purple is filled just like the blue
The code block(s) should be formatted like:
his_data_objs[i] = lv_list_add_btn(list, NULL, “btn”);
lv_obj_set_style_bg_color(his_data_objs[i], lv_color_make(0x80, 0x80, 0xD0), LV_PART_MAIN);
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.