Important: The information in this document is obsolete and should not be used for new development.
Chapter 28 -
This chapter includes recipes and sample code that demonstrate how to
Working With Drag and Drop
MacApp's drag-and-drop support is described in detail in Chapter 9, "Drag and Drop."
- include and initialize MacApp's drag-and-drop support
- turn on drag-and-drop support for a view
- add drag-and-drop support to a custom view class
Chapter Contents
- Overview
- Recipes--Drag and Drop
- Recipe--Including and Initializing MacApp's Drag-and-Drop Support
- Include MacApp's Drag-and-Drop Code in Your Application
- Call the InitUDragManager Initialization Routine
- Recipe--Turning on Drag-and-Drop Support for a View
- Setting Drag-and-Drop Fields Directly
- Setting Drag-and-Drop Fields Using the TDragDropBehavior Class
- Recipe--Adding Drag-and-Drop Support to a Custom View Class
- Define a Subclass of TView or Another View Class
- For a View That Initiates Drags, Override Certain Methods
- DoAddDragContent
- DoFulfillPromise
- For a View That Accepts Drops, Override the WillAcceptDrop Method
- Override the DoMakeDragDropCommand Method
- Include and Initialize MacApp's Drag-and-Drop Support
- Turn on Dragging or Dropping for the View
- Override Additional Methods
- WillDrag
- Override the DoMakeDragCursorRegion or DoMakeDropHiliteRegion Method
- Override the DoMakeDragOutlineRegion Method
- Setting the Drag Cursor