Getting a Foldername

I want to get the name of the last folder I selected in my DirectoryListBox. I don´t want to get the full path.

 

yngviAsked:
Who is Participating?
 
dwwangConnect With a Mentor Commented:
LastFolderName:=DirectoryListBox.Items[DirectoryListBox.ItemIndex]
0
 
sal1150Commented:
aha

i find the answer

procedure TForm1.ListBox1Click(Sender: TObject);
begin
Label2.Caption :=AppDir+'\'+ListBox1.Items[ListBox1.ItemIndex];
end;
0
All Courses

From novice to tech pro — start learning today.