O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Emptying the playlist

The code is as follows (see code 5.03view.py):

def empty_play_list(self): self.model.empty_play_list() self.list_box.delete(0, END)

This completes our third iteration. In this iteration, we saw how to work with the Listbox widget. In particular, we saw how to add items to the Listbox widget, select a particular item from the Listbox widget, and delete one or more items from it.

You now have a playlist where you can add and delete items using the four buttons at the bottom-left corner of the audio player.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required