Taira
Taira

Reputation: 489

How can I remove an image from a carousel in kivy?

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

Answers (2)

ODiogoSilva
ODiogoSilva

Reputation: 2414

You do have a remove_widget() method that works the same way as the add_widget().

Upvotes: 3

Chirgal
Chirgal

Reputation: 1

Use carousel.clear_widgets(). It will remove everything added to carousel widget.

Upvotes: -1

Related Questions