Latest Build: 2.4.2 - Check Updates Page for Details
DropMaster is a set of 4 native VCL controls for use in Delphi and
C++Builder. While the VCL components included with Delphi and C++Builder
permit drag and drop between windows in the same application, DropMaster
allows developers to add support for drag and drop between applications.
The drag and drop can be between the developer's new application and
existing applications such as the Microsoft Office suite, a web browser,
etc., or between two custom-written applications.
DropMaster's functionality is divided according to whether you want to
allow the user to drag from his application to elsewhere, i.e., a drag
source, or from elsewhere to his application, i.e., a drop target. In
addition to the actual drag and drop functionality, the components expose
several events that allow the developer to get feedback on the drag and
drop process while it is happening, or to modify it.
The 4 DropMaster components are:
TDMTextSource deals with dragging data from your application to
another. For simple use, you can assign a TWinControl on your form to the
DonorComponent property, detect the drag in the control's OnMouseDown
event, and call the Execute method. Appropriate content (e.g., selected
text or list items, etc.) is then dragged to the other application. For
more sophisticated use, there is a Text property to which you can assign
any content you like.
TDMTextSource is also the component that is used for dragging arbitrary
formats other than text, through the use of its CustomFormatData property.
In particular, you can drag more than one format, and the target
application can accept any of those available. For example, when you drag
cells from Excel, the data are made available in many different formats,
from plain text, to a bitmap of the cells, etc.
TDMTextTarget deals with accepting data dragged into your application
from another. You assign a TWinControl on your form to the AcceptorControl
property, and write an OnDrop handler to tell the TDMTextTarget how to
deal with the data that has just been dropped. Natively, TDMTextTarget
knows how to accept text, RTF, HTML, lists of files, and URLs.
TDMTextTarget is also the component that is used for accepting
arbitrary formats other than text, through the use of its CustomFormat
property. In the OnDrop event you can find out what formats are available
and decide which to process.
Other than the native formats in TDMTextTarget, graphic images are the
most commonly requested data types for drag and drop. For convenience, we
provide TDMGraphicSource which works just like TDMTextSource, except that
it has DonorImage and Picture properties (of type TImage and TPicture,
respectively), which correspond to the DonorComponent and Text properties
of TDMTextSource. Dragging a picture becomes as easy as assigning it to a
property, detecting the drag, and calling Execute.
TDMGraphicTarget can accept pictures dragged from another application.
For convenience, it deals with multiple formats like DIBs, bitmap handles,
metafiles and enhanced metafiles, so the developer need only provide a
home for the TPicture data that is accepted. Of course, there is ample
opportunity for customizing the process as with the other components.