Drag and drop allows users to initiate activities by dragging a control and dropping it on another control. It provides a simple way to make applications graphical and easy to use. For example, in a manufacturing application you might allow the user to pick parts from a bin for an assembly by dragging a picture of the part and dropping it in the picture of the finished assembly.
Drag and drop involves at least two controls: the control that is being dragged (the drag control) and the control to which it is being dragged (the target). In PocketBuilder, all controls except drawing objects (lines, ovals, rectangles, and rounded rectangles) can be dragged.
Platform notes Actions that require an application user to drag a control should be avoided since these actions are not very practical for users of handheld devices. Although you can script calls to drag events on Smartphone platforms, controls cannot be moved with a mouse or stylus, and the user has no direct way of dragging a control.
When a control is being dragged, it is in drag mode. You can define a control so that PocketBuilder puts it automatically in drag mode whenever a Clicked event occurs in the control, or you can write a script to put a control into drag mode when an event occurs in the window or the application.
Window objects and all controls except drawing objects have events that occur when they are the drag target. When a dragged control is within the target or dropped on the target, these events can trigger scripts. The scripts determine the activity that is performed when the drag control enters, is within, leaves, or is dropped on the target.