Instead of using a hard coded path for the music directory, you should use the special locations offered by the File class. I believe it can be used like this:
File musicDirectory = File::getSpecialLocation(SpecialLocationType::userMusicDirectory);
Instead of using a hard coded path for the music directory, you should use the special locations offered by the File class. I believe it can be used like this:
File musicDirectory = File::getSpecialLocation(SpecialLocationType::userMusicDirectory);
Scanning an entire disk folder every time you need to paint each individual listbox row might not be the most efficient way to implement it, though!