Reputation: 489
I didn't really find anything in the documentation on this so here goes:
I know you can add a widget (for example, an image) to a carousel by doing
carousel.add_widget()
But how can I remove a widget? In my particular case, I have a bunch of images which I want to filter by search text. Once the search is performed, how can I filter out the images which do not match?
Upvotes: 1
Views: 328
Reputation: 2414
You do have a remove_widget()
method that works the same way as the add_widget()
.
Upvotes: 3
Reputation: 1
Use carousel.clear_widgets()
.
It will remove everything added to carousel widget.
Upvotes: -1