Parse files loaded in memory and get them as a list in a combobox

I would like to have access to the files I have loaded on memory (loaded by dragging the folder in the projucer) in the form of a list, which then I would show through a comboBox.
Something like what the projucer does here:


By clicking on here I see the image files I have previously uploaded.
How to get such a list inside my program?

The Projucer is likely searching the project directory for any icon files to be able to populate that list.

If your files are loaded into the BinaryData namespace then you won’t be able to iterate them in the same way, you’d have to manually populate the ComboBox.

If you’re happy to ship the files alongside your application you could use DirectoryIterator.

There is a raw array in the BinaryData compiled in. You can do it like my little helper class I use in my PluginGuiMagic GUI builder/editor:

1 Like

Thanks Daniel. Top! That’s exactly what I needed . :smiley: