Dragging from a Static Icon |
Open Client Administration |
When you drag from a Static Icon, you can only select one Static Icon in a single drag movement. In other words, you cannot select multiple Static Icons to drag in one go. The Static Icon must have the DragEnabled property for the Drag functionality to work. When you perform a drag, the data payload associated with the drag consists of a string with a maximum length of 250 bytes, and a Drag Type. This, in combination with the target object’s DropTypeAllowed property enables the Open Client to validate that matching data is being dropped (e.g. a person can only be dropped on person target, a machine part on a machine parts target, etc.).
The string is set up in the DragData property of the Static Icon.
For example:
StaticIconTag.DragData = ‘Joanna Smith'
places the string ‘Joanna Smith’ into the drag payload.
The drag type is configured in the DragType property of the Static Icon.
StaticIconTag.DragType = ‘Employee’
places the data type ‘Employee’ into the drag payload.
These properties can be set up at design time, in a Property Sheet, or in logic.
When a drag occurs, a transparent version of the icon appears along with its label (if there is one). A red no entry sign appears if the icon is dragged over areas that do not accept the drop. You can amend the visual appearance of the drag behaviour by changing the details in the Open Client's cascade style sheet.
Topic ID: 800103