ComboBox improvement


#1

Hi Jules,

Can you add this code into the file juce_ComboBox.cpp ?

void ComboBox::removeAllItems()
{
items.clear(true);
}

And this into the file juce_ComboBox.h :
/** Remove all items in the drop-down list.
*/
void removeAllItems();

Sorry if a best solution already exists, I’m new with JUCE, I don’t know the full code.


#2

I’m not jules, but why not using void ComboBox::clear (NotificationType
notification = sendNotificationAsync)
?


#3

Yes. It works. Thank You. I have not looked long enough !
I saw addItem() and my logic wanted a removeItem() !


#4

NP. The clear() is analog to the items.clear() you wanted to call on the item’s list though :wink: