I am unable to set the border color of the pressed state of a dropdown in the current MP/LVGL. Setting the background works as does setting the border for the default and focused states. But this has no effect:
lv_obj.set_style_local_border_color(lv.dropdown.PART.MAIN, lv.STATE.PRESSED, mycolor)
Is this a bug or am I missing something obvious?
I’m not sure.
It’s probably not Micropython specific.
@kisvegabor, @embeddedt - Any idea?
It’s not really a bug but a counter-intuitive behavior in the material theme (I assume you are used it).
The material theme defines the border color in
pressed | focused. If you click the dropdown it will go to
pressed | focused state and the
pressed | focused color from theme theme will overwrite your
You can do 2 things:
- Add the
lv_conf.h to disable focused styles. I’ve pushed a fix for it to the
release/v7 branch of lvgl. Please, be sure to update to it.
- Add border color in
pressed | focused states too