How to slide continuously an child object in a parent

Hi All,

Description

I am trying to control object when its animation is running.
This object is set a parent-child relation with a container.
Object will be slide from left to right, and when the part of object is disappeared by going out to container range, that part will be appeared at the opposite of container.

image

Similarly, in case of screen, I just have a screen, and how to slide this screen with itself?

Hi @kisvegabor , @embeddedt

Do you have any solution for this case (object & screen)?

E.g. in case of the label widget scrolling needs to do something similar. See here Label (lv_label) — LVGL documentation

The label simply draws the text twice: once on the left and once on the right.

With the object you want to scroll you can do something similar with a custom LV_EVENT_DRAW_MAIN.

In case of a compound widget (e.g. button + label) it’s more complicated. You can use the snapshot feature to make an image from that compound object and do the same trick LV_EVENT_DRAW_MAIN with.

If it can work for you I can give more info about implementing the custom draw event.

Hi @kisvegabor

It sounds great.
I am using ver 7.10.1, LV_EVENT_DRAW_MAIN just from ver 8, isn’t it?
(if ver > 8 is mandatory, maybe I will upgrade ver)

Could you give me more info, and example about implementing the custom draw event?

It’s quite cumbersome in v7. And snapshot is not available in v7. So for such a complex feature I suggest updating to v8.