[SOLVED] Creating a playlist lazarus / 31-LCL ---------------------------------------------------------------------- Pe3s · 2022-03-24 18:44 Hi I have started to create a playlist with a ListBox component with the ability to write and read to a .txt file for example. I assumed that the playlist will display the file names + extension. I wrote the beginning of the code and I have a problem with the file paths. Now the playlist displays the full track. My questions: 1. how can I correct the paths 2. How to implement read and write Thanks for your help Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);var  i: integer;begin  with OpenDialog1 dobegin  Options := Options + [ofAllowMultiSelect];  if Execute then  for i := 0 to Files.Count -1 do  //ListBox1.Items.Add(Files.Strings[i]);  ListBox1.Items.Add(ExtractFileName(Files.Strings[i]));  end;end; procedure TForm1.Button2Click(Sender: TObject);begin  ListBox1.Items.SaveToFile('d:\lista.txt');end; procedure TForm1.Button3Click(Sender: TObject);begin  ListBox1.Items.LoadFromFile('d:\lista.txt');end; procedure TForm1.ListBox1DblClick(Sender: TObject);begin  Image1.Picture.LoadFromFile(ListBox1.Items[ListBox1.ItemIndex]);end; ---------------------------------------------------------------------- howardpc · 2022-03-24 22:36 You need to deal with metadata associated with each track file. The attached project shows one way to do this, and its double-click functionality depends on the existence of a .jpg file with the same name as the track (.mp3 or whatever). Clearly, if your images are otherwise named you will need to adapt this aspect to make it work. ---------------------------------------------------------------------- Pe3s · 2022-03-25 17:34 Super, thank you @howardpc