[Webinar] Streamline your web hosting managementRegister Today


Drag & Drop using DirectoryListBox / FileListBox

Posted on 1999-12-13
Medium Priority
Last Modified: 2012-06-21
I have a DirectoryListBox and a FileListBox on a form. I am trying to accomplish two tasks:


I want to be able to select a file from the FileListBox and drag the file into a folder in the DirectoryListBox. Obviously it would be a different folder than where the file currently resides.


I would like to be able to edit the name of the file in the FileListBox control.

Basically, I am needing Windows Explorer type functionality using these two objects. I am using Delphi 3.0 Professional.

Thanks in Advance for any "code" snippets or sample apps.

Question by:paulacf
1 Comment
LVL 17

Accepted Solution

inthe earned 200 total points
ID: 2278436
Plop a DirectoryListBox on a form along with a FileListBox. Change the FileListBox property of "DragMode" to Automatic instead of manual.
procedure TForm1.DirectoryListBox1DragOver(Sender, Source: TObject; X,   Y: Integer; State: TDragState; var Accept: Boolean);
  Accept := Source is TFileListBox;

for some great dragdrop components see here:

to rename a file you can use:


i think the example in the delphi demos directory might do this (delphi\demos\doc\filmanex) directory.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question