XTF2_DRAGDROP2

Added January 2011

This flag enables drag/drop operations between different XTREE controls. To enable, set the flag in the source tree, and specify the advanced coldef option, DragDropExit=###, in the destination tree. ### is the negative exitcode to be generated when an item (or items) from the source tree is/are dropped on to the destination tree. For example, DragDropExit=150 will generate exitcode -150.

Notes

•   This form of drag/drop (inter-tree) does not require any special mapping of the answer array (as is required with the intra-tree drag/drop activated by XTF_DRAGDROP).

•   Both forms of drag/drop are essentially independent (you can have either one or both).

•   No distinction is made regarding the exact position of the drop within the target control. The only information returned to the application will be the selection information for the source tree, and the DragDropExit exitcode from the target tree.

•   It is left to the application to complete the operation signified by the drag/drop action. Typically this would involve copying the selected items from the source tree to they destination tree, and perhaps removing them from the source tree.

The sample program XTRA4.BP in EXLIB:[908,21] has been completely rewritten to demonstrate a simple shopping cart application using this capability.

See Also

•   XTF_DRAGDROP to drag and drop within a single tree, for item re-ordering..

•   XTF2_FILEDROP for dragging a file from an Explorer or Windows Shell dialog and dropping it on an XTREE control.

 

History

2011 January, A-Shell 5.1.1203:  Added to A-Shell