|
|
|
| dcFolderListView component.
|
| function FileAttributesByListItem(ListItem: TListItem): TdcScanAttributes;
|
| The FileAttributesByListItem method returns the file attributes by list item of the dcFolderListView.
|
| 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;
|
| FileNameByListItem, FileSizeByListItem, FileTypeByListItem, FileTimeByListItem, FileAttributesByListItem and ListItemByFileName methods.
|