Reputation: 57
I would like to ask how could I add dynamically some widgets in my application one by one and not all at once. Those widgets are added in a for loop which contains the add_widget()
command, and is triggered by a button.
So I would like to know if there is a way for the output to be shown gradually, and not all at once, in the end of the execution. Initially I tried to add a delay inside the for loop, but I'm afraid it has to do with the way the output is built each time.
EDIT: Well, it seems that I hadn't understood well the use of Clock.schedule_interval
and Clock.schedule_once
, so what I had tried with them (or with time.sleep) didn't succeed at all. But obviously, this was the solution to my problem.
Upvotes: 1
Views: 81
Reputation: 29450
Use Clock.schedule_interval
or Clock.schedule_once
to schedule each iteration of the loop at your desired time spacing.
Upvotes: 1