Five components are included in this pack. The three major ones enableapplications to support Windows Explorer file drag and drop operations. Theremaining two subsidiary components link to and filter the files dropped onone of the primary components. The components are:TPJDropFiles: This windowed component catches files dropped anywhere overits window. It can act as a container for other components.TPFormDropFiles: This non-visual component catches files dropped anywhereon its form, including the non-client areas.TPJCtrlDropFiles: This non-visual component catches files dropped on an associated TWinControl or TFrame.TPJExtFileFilter: When linked to a TPJDropFiles or a TPJFormDropFilesthis component filters dropped files by extension. One or more extensions canbe provided.TPJWildCardFileFilter: Like TPJExtFileFilter except that it filters basedon a DOS-style wild-card string.In addition to the above an abstract base class is provided from whichdevelopers can derive other filter components.Key features of TPJDropFiles, TPJCtrlDropFiles and TPJFormDropFiles are:An OnDropFiles event is triggered when files are dropped.The names of dropped files are made available through the Files arrayproperty. For convenience, the name of the first such file is also stored inthe FileName property.The list of dropped files can be configured to include only files, onlyfolders or all files and folders.Dropped folders can be recursed so that all the files and sub-folders ineach of the dropped folders are listed.Filters can be applied to the dropped files and folders. This is doneeither by linking to a filter component (see above) or by handling theOnFileFilter event and deciding which files and folders to pass through thefilter in the event handler.The mouse co-ordinates where the files were dropped can be retrieved, ascan a reference to any control under the mouse cursor at the time.The OnBeforeDrop event can be used to perform pre-processing before thefiles are actually dropped.The IsFolder array property tells if the equivalent item from Files array isa file or a folder.The owning window can be brought to the front when files are dropped.Some design time assistance is provided by component and propertyeditors.A OpenHelp compatible help file is included that integrates with theOpenHelp system of Delphi 3 to 7. The help file can be used independentlyof the Delphi 2005 and 2006 IDEs with some loss of functionality.Two demo programs are included in the download. The first exercises bothdrop files components and the related file filtering components. The second shows how to use TPJCtrlDropFiles with frames.
|