How to add style(like a font, text color) to list of Drop-down list widget on LVGL 8.1


I found the problem of LVGL V.8.1 cannot add style to the list of drop-down list widget but on V7.11 work fine(by using selector is LV_DROPDOWN_PART_LIST but on V8.1 it is not available for this selector).

What MCU/Processor/Board and compiler are you using?

TI, Embedded Linux and Eclipse

What LVGL version are you using?


What do you want to achieve?

I would like to change the style(like a font, text color) in the list of drop-down when clicked it.

What have you tried so far?

I have tried to use lv_obj_add_style(dropdownobject, &styleNew, LV_STATE_PRESSED / LV_PART_MAIN or etc. ); but do not work any more in the list of drop down.

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

I have solved this issue by using as below to change a new style of the list of dropdown list widget.
lv_obj_t * list = lv_dropdown_get_list(dropdown) /Get the list/
lv_obj_add_style(list, &my_style, …) /Add the styles to the list/}

Yes, I’ve pushed an update a few days ago to make it work in this simple way.