How to change the color of text of a particular cell in v8?

Description

How to change the color of text of a particular cell.

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

VisualStudio Simulator

What LVGL version are you using?

V8

What do you want to achieve?

I wait to mark a selected cell via lighting the text of the cell.

What have you tried so far?

I can colour bg_color of a particular cell via dsc->rect_dsc->bg_color
But I can not find a way to change the text of a a particular cell.
I know that the text of a particular cell can be changed via the way :How to change text color in a table in v7.
But the API functions lv_obj_set_style_local_text_color and lv_table_set_cell_type seem to be deprecated in v8.

Screenshot and/or video

Thank you for your suggestion. Best Wishes.

lv_obj_set_style_local_text_color has been renamed to lv_obj_set_style_text_color. The local has been dropped.
As for the lv_table_set_cell_type I don’t know.

Thank you for your information :slight_smile:

Looks like lv_table_set_cell_type was removed and you now need to implement per-cell styling in the event handler, by setting fields of lv_obj_draw_part_dsc_t parameter.

(Related discussion)

Thank for your information.
I have changed the particular cell bg_color by setting fields of lv_obj_draw_part_dsc_t parameter. It works correctly.
I have used the API function lv_style_set_text_color() to colour to text of table, hence I think that there is a way to change the color of the text in a particular cell.
I have read the definition of lv_obj_draw_part_dsc_t*, But I can not find the corresponding parameter to change the color of text of a particular cell.
Do you know what is the parameter in lv_obj_draw_part_dsc_t* corresponding to the text of a cell in table, could you give me further advice? Thank you very much!

Did you try dsc.label_dsc.color?

Thank you for your advce. It’s work ! :slightly_smiling_face: