folderlistview FileNameByListItem method
Return to Introduction  Previous page  Next page
Applies to
dcFolderListView component.  

Declaration
function FileNameByListItem(ListItem: TListItem): String;  

Description
The FileNameByListItem method returns the full path and the file name with extension by list item of the dcFolderListView.  

Example
procedure TForm1.dcFolderListView1MouseDown(Sender: TObject;  
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);  
var  
  ListItem: TListItem;  
begin  
  with dcFolderListView1 do  
   begin  
    ListItem := GetItemAt(X, Y);  
    if ListItem <> nil then  
      Edit1.Text := FileNameByListItem(ListItem);  
   end;  
end;  

See also
FileNameByListItem, FileSizeByListItem, FileTypeByListItem, FileTimeByListItem, FileAttributesByListItem and ListItemByFileName methods.