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

Declaration
function FileAttributesByListItem(ListItem: TListItem): TdcScanAttributes;  

Description
The FileAttributesByListItem method returns the file attributes by list item of the dcFolderListView.  

Example
procedure TForm1.dcFolderListView1Click(Sender: TObject);  
var  
  Pos: TPoint;  
  ListItem: TListItem;  
begin  
  with dcFolderListView1 do  
   begin  
    { determination of the mouse position }  
    GetCursorPos(Pos);  
    Pos := ScreenToClient(Pos);  
 
    { determination of the list item by mouse position }  
    ListItem := GetItemAt(Pos.X, Pos.Y);  
    if ListItem <> nil then  
     if saDirectory in FileAttributesByListItem(ListItem) then  
      begin  
       ShowMessage('Click on directory');  
      end;  
   end;    
end;  

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