Remove all items from ControlP5 dropdownlist


I’m filling a controlp5 dropddownlist with columns from a CSV file.

 for (int i=0; i<columns.length; i++) {
    time.addItem(columns[i], i);

But when I load a different file, the controlp5 dropdownlist should show the columns of that file. How do I remove all items from the dropdownlist so that I can add the items from the new file to an empty list?


That was actually really easy.


did it for me!