Before posting
Hello
Description
What’s going on here?!?
my file has UTF8 encoding, every text is ok but drop-down list nothing show’s, what can i DO?
What MCU/Processor/Board and compiler are you using?
VS Simulator
What LVGL version are you using?
7.10.0
What do you want to achieve?
‘’’
lv_style_set_text_font(&style, LV_STATE_DEFAULT,
&lv_font_dejavu_16_persian_hebrew);//change font
lv_dropdown_set_options(ui.ddlist_key_type, ("سلام\nعلیکم\nسلام سلام\nعلیکمعلیکم"));
i also tried this:
lv_dropdown_add_option(ui.ddlist_key_type, “سلام”, 0);
lv_dropdown_add_option(ui.ddlist_key_type, “علیکم”, 1);
lv_dropdown_add_option(ui.ddlist_key_type, “سلام سلام”, 2);
lv_dropdown_add_option(ui.ddlist_key_type, “علیکمعلیکم”, 3);
‘’’
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
another game with style and font:
static lv_style_t style;
lv_style_init(&style);
lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
lv_dropdown_set_options(ui.ddlist_key_type, "Image+Text\nImage\nText");
lv_obj_add_style(ui.ddlist_key_type, LV_OBJ_PART_MAIN, &style);
Result:
now i just add font to style
static lv_style_t style;
lv_style_init(&style);
lv_style_set_text_font(&style, LV_STATE_DEFAULT, &lv_font_dejavu_16_persian_hebrew);//change font
lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
lv_dropdown_set_options(ui.ddlist_key_type, "Image+Text\nImage\nText");
lv_obj_add_style(ui.ddlist_key_type, LV_OBJ_PART_MAIN, &style);
Result:
i have shadows on list selected text