Change transparency/opacity based on position of other object


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


What LVGL version are you using?


What do you want to achieve?

I want to change an object’s transparency based on the position of another object. The other object can be dragged but is also animated.

What have you tried so far?

I tried to change the transparency when the other object receives a LV_EVENT_SIZE_CHANGED but that is not triggered on position changes.

Is there an event for “position changed”?


Got this kind of working with using references to the transparent object both in drag and animation callback: Demo