How can I implement the idea in the pictures in a Delphi project? So that there is a TComboBox
to display drives C, D and E with icons, and when choosing a path, all folders and files with icons appear at the bottom. I think it is TListview
, so that when I click on a path, its files appear, and when I click on any file, any of its content appear, whether other files or images.
Those are legacy controls from 16 bit Windows 3.1 - you can find the controls in the tab "Win 3.1". They are:
TDriveComboBox
,TDirectoryListBox
andTFileListBox
...all sitting in the Vcl.FileCtrl.pas
unit.
In the properties you have to link each control to the other, so they automatically work together. Here's an example DFM as text, also with a TFilterComboBox
:
object Form1: TForm1
object dcbDrive: TDriveComboBox
DirList = dlbFolder
end
object dlbFolder: TDirectoryListBox
FileList = flbFile
end
object flbFile: TFileListBox
end
object fcbFilter: TFilterComboBox
FileList = flbFile
end
end