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

Description

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?

8.1

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.

Hello, this method adds the same style to each dropdownlist element. How can I add different styles (each element has its own style)?

Which method? You can add different styles to each drop down and their lists.

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 /}

This method adds the same style to all drop down list items.

I mean, for example, there is a text drop down list and I want that each element of the list to be a different color. If it’s not difficult, you could give an example of how this can be implemented.

The problem is that in the text drop down list, all its elements are represented as a single label.

Hi, can you explain how to apply different styles to each item in the dropdown list? I’m not sure how to make each item have its own style