Creation of an object on a screen, 2 seconds after it's loaded

Hello! I would like to know if there is a way to create a button (Button1 for example) on a screen (Screen1), 2 seconds after the screen (Screen1) is loaded. I think I might be able to do it with tasks but I’m not sure how.
Thanks in advance!

Install Squareline studio and learn howto do . Its simple event.

Thank you for your reply, actually I just used :
lv_timer_t * my_timer = lv_timer_create(Function, 2000, NULL);

Maybe you missread docu and my reply, but timers is for repeated calls, not once.
Use it for once is waste of resources .

Yep you are right, it is for repeated calls. I want it for a single call. I didn’t find a solution on Squareline Studio, not a single one of the events can do what I want.

Nobody needs such useless, snarky reply.

Its not just a simple event in Squareline.

Unless you know the answer, don’t post.

1 Like

For example in SQS place button bottom mid and set y to 100 = button outside screen, then create animation 100 to 0 …
image

but you ask create button yes this is other way. Creating object need in main loop code manage timed system . Exist many ways. If you plan use lv_timer_create then read docu and do it.

You can use a timer; create a timer and then set no repetitions with lv_timer_set-repeat_count(timer, 1). In the callback you can draw the button

1 Like

That’s what I did and it works. Thank you for your time!

1 Like

You’re welcome :slightly_smiling_face: