How to refresh the display after lv_dropdown_set_options()?


I have a dropdown list with “show” enabled, so it displays the selected options.
My concern is when I’m modifying the list of options using lv_dropdown_set_show_selected(), the old active option is displayed until I click on the dropdown.
Even if I use lv_dropdown_set_selected() after this modification.

So how can I make the display refreshed ?

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

ESP32 / Lilygo T-Watch 2020 v1

What LVGL version are you using?


What do you want to achieve?

In the description :slight_smile:

What have you tried so far?

With / without lv_dropdown_set_selected()

Screenshot and/or video

Example vidéo :

1/ Initially the 1st dropdown show “RDC” and 2nd the corresponding entry with is “Parents”.

2/ When I click on the 1st one, an even is called that updates second’s options.
So I’m expected to see “Amis” but “Parents” remains.

3/ Only when I’m clicking on the 2nd one, it is update

So any tips welcome :slight_smile:


ps : the source code is on my git, especially in file TlShutter.cpp

Update your LVGL version - we only support the release/v7 branch on GitHub.

(If you really don’t want to update very far, 7.8.1 is the earliest version containing the fix, though I strongly advise using latest v7 if possible.)

Ha, ok, so it’s an issue with the library itself.
Thanks for your reply, I’ll request Lilygo to upgrade their framework.



1 Like

Interesting… that’s now a second framework I know of that hasn’t updated past 7.7.2. There weren’t any big changes in 7.8 so I’m puzzled as to why.

For Liygo one, I guess it’s because I guess Lewis is more focusing on examples for the new products they are released very often than to upgrade the core :slight_smile:


So, I upgrade to 7.11.0 … but the issue remains :frowning:

Any idea ?

I tried to set lv_dropdown_set_show_selected() to true but … same problem.
Any idea welcome as it’s voiding a bit my dashboard project :frowning:


I found where the problem is … but not the solution.

When the dropdown is changed by lv_dropdown_set_selected() the new text is drawn on the application memory buffer … but this memory buffer is not transferred to the screen.

Any tips to do that ? It’s automatic for label but not for dropdown :frowning:

Do you mean that the working buffer provided to LVGL is updated, but flush_cb is not called?