We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Micropython LVGL Colour



  • I have been playing around with LVGL and Micropython on the Dash and have had some success. I can't find much documentation on how to change styles in Micropython but I have been able to figure out how to change the main colour but cannot figure out how to change the colour when a button is pressed. Anyone have example code or know where there might be more complete LVGL Micropython documentation?

    Thanks.



  • @Mark-Fisher the LVGL community is quite active, you may have more luck posting in LVGL specific community groups. https://forum.lvgl.io/



  • I am definitely going to try that next, but I think the problem may be specific to the Omega port of the Micropython library so I thought I would try here first.

    Sorry I wasn't quite clear in my explanation. I have found a few examples showing how to change the PRESSED colour:

    style.set_bg_color(lv.STATE.PRESSED, lv_colors.GRAY)
    

    which works in the emulator but doesn't work on the Dash. I get errors saying that the object has no attribute 'set_bg_color' and there is no module 'lv_colors'.

    Also this port doesn't have a textarea widget. So I am just wondering if there is any kind of documentation on what has been ported and what hasn't.


  • administrators

    @Mark-Fisher the example code might be for the C version of LVGL?

    As far as I recall, they had pretty sparse documentation for the micropython port. But that might have changed, I haven't looked into it in quite some time.

    I agree with @crispyoz, your best bet is to go straight to the source and try posting on the lvgl forum. Let us know how it goes!



Looks like your connection to Community was lost, please wait while we try to reconnect.