Highlight multiple labels in drop down list


Drop down list widget is really nice and well made with good features as it makes our task easy.

  1. Is it possible to customize the drop down list such that I can give different color to each row text in the list.
  2. Can I add any symbol along with the row text.
  3. Can I highlight multiple labels with different colors.

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

What LVGL version are you using?


What do you want to achieve?

Our expectation is given below under the screenshot

What have you tried so far?

  1. I have tried by giving color value along with text eg. “#FF00000 Apple is red#” as it is done with label widget.

Code to reproduce

lv_dropdown_add_option(dropDownList, "#FF00000 Apple is red#", optionIndex);

Screenshot and/or video