Drop down list arrow missing

Description

I’m trying to create a drop menu with an arrow. Maybe it’s a style issue, but I’m not sure what to change to see the arrow.

What do you want to achieve?

I’d like to see an arrow to drop down.

What have you tried so far?

Set the lv_ddlist_set_draw_arrow to true

Code to reproduce

	/*Create a drop down list*/
	lv_obj_t * ddlist = lv_ddlist_create(parent, NULL);
	lv_ddlist_set_fix_width(ddlist, 300);
	lv_ddlist_set_fix_height(ddlist, 290);
	lv_ddlist_set_sb_mode(ddlist, LV_SB_MODE_AUTO);
	lv_ddlist_set_draw_arrow(ddlist, true);
	lv_obj_align(ddlist, NULL, LV_ALIGN_IN_TOP_MID, 0, 20);
	lv_obj_set_event_cb(ddlist, event_handler);
	lv_ddlist_set_options(ddlist, "Select a Card\n" /*0*/

Screenshot and/or video

image

Are you using one of the default fonts? If not, does your font include the arrow symbol?

I’m using Roboto, I didn’t even think about the font being the issue.

Hi kw531,

I don’t see that you’ve picked a style anywhere. I copied the code you gave me and I see the drop-down, but I didn’t give this object a style so it’s using the defaults. I see this:

ddlist

And per embeddedt’s post, my default font is LV_FONT_ROBOTO_22.

I have a custom style that I’m using for this project. Any idea what style setting I should change?

@kw531 Does it work if you use the same font but with just a default style?

No dice.
And I made a mistake in my earlier post, I had not set a style for this drop down. I am using the material theme as the default theme. I’m not sure if that’s playing a part or not.

	lv_obj_t * ddlist = lv_ddlist_create(parent, NULL);
	lv_ddlist_set_style(ddlist,LV_DDLIST_STYLE_SEL, &lv_style_pretty_color);
	lv_ddlist_set_style(ddlist,LV_DDLIST_STYLE_BG, &lv_style_pretty_color);
	lv_ddlist_set_style(ddlist,LV_DDLIST_STYLE_SB, &lv_style_pretty_color);
	lv_ddlist_set_fix_width(ddlist, 300);
	lv_ddlist_set_fix_height(ddlist, 290);
	lv_ddlist_set_sb_mode(ddlist, LV_SB_MODE_AUTO);
	lv_ddlist_set_draw_arrow(ddlist, true);
	lv_obj_align(ddlist, NULL, LV_ALIGN_IN_TOP_MID, 0, 20);
	lv_obj_set_event_cb(ddlist, event_handler);
	lv_ddlist_set_options(ddlist, "Select a Card\n" /*0*/

image

Did you change this setting in lv_conf.h? https://github.com/littlevgl/lvgl/blob/f34598d81020247ecaf12c4fb8e7026ff3420954/lv_conf_template.h#L352

I have not changed that setting.

I changed my theme to use this explicitly, and I still see the drop-down arrow. Sorry, I don’t know how much more help I can be at this point.

Are you developing in the PC Simulator, or in an embedded device? If the latter, perhaps you could give the simulator a try as this helps me rule out whether the problem is in the library or my embedded environment.

Just to check. Did you generate your own font or use the supplied one?

If you generated your own using roboto and didnt include the FoneAwesome symbols then you will see this.