As Zathras said the easiest way is TFileListBox. You can use it with TDirectoryListBox, TDriveComboBox, and TFilterComboBox
All these components are in 'Win3.1' palette.
I don't know what you want to do. But consider to use (also) OpenDialog, SaveDialog from 'Dialogs' Palette.
Thanks for the replies. What I'm trying to accomplish is to make two listboxes, listbox1 would list all filenames from C:\DATA, and listbox2 would be blank. The user would select filenames from listbox1, click an "add" button, and it would remove the selections from listbox1, and add to listbox2. Also, a "remove" button to do the reverse. Any ideas?
I would consider using a hidden TFileListBox and two TListBox components. At start-up (or whenever is appropriate for your application) populate one of the TListBox components from the TFileLsitBox:
Code:
ListBox1.Items.Assign(FileListBox1.Items);
Then carry on with a normal "duelling list boxes" type of process.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.