How can i add addItemList to a PopupMenu?

Hey!
I have a problem with presets. I have fractory presets called “factoryPresets”. Its load from /Users/Documents/ProjectName i can show this presets in a combobox(red redtangle in the picture) with: presetList.addItemList(factoryPresets, 30); but i want to add or replace this preset list to a subMenu inside my combobox. I cant figure out how to do this because PopupMenu dont have “addItemList” function. Thanks for any help!

Heres my code:

const auto userPresets = presetManager.getAllPresets();
			const auto factoryPresets = presetManager.getFactoryPresets();
			const auto currentPreset = presetManager.getCurrentPreset();

			presetList.addSeparator();
			presetList.addSectionHeading("User");
			presetList.addItemList(userPresets, 1);
			presetList.setSelectedItemIndex(userPresets.indexOf(currentPreset), juce::dontSendNotification);
			presetList.setTextWhenNothingSelected("Default");
			presetList.addSeparator();
			presetList.addSectionHeading("Artists");

			presetList.addItemList(factoryPresets, 30);

			juce::PopupMenu subMenu;
			subMenu.addItem(1, "i want YLS 1 place here");
			subMenu.addItem(2, "i want YLS 2 place here");
			subMenu.addItem(3, "i want YLS 3 place here");
			presetList.getRootMenu()->addSubMenu("Máté Bognár - YOUR LAST STEPS", subMenu);

Sorry about my english. Picture attached

juce

Iterate the factoryPresets object in a loop and assign to the popup menu.

Assuming it’s a StringArray, something like this?:

for (auto i = 0; i < factoryPresets.size(); i++)
{
    subMenu.addItem (i + 1, factoryPresets[i]);
}

Thanks! its worked! #lifesaver