Using drag-and-drop in E3.

Although E3 does not have any specific event to handle this functionality with screen objects (graphical primitives, ActiveX, user’s XControls, etc.), this resource can be developed very easily. This article shows you how to implement the drag-and-drop resource to transfer data from one object to another.

Settings

A drag-and-drop event can be broken down into three actions: continuous click, mouse movement, and end of click (when the object is at its final destination). Since E3 does not support drag-and-drop events, this task will comprise three different phases to create this event. To implement this resource, you will need to:

  • Decide which screen objects are the starting point for the event.
  • Set previously which properties will be transferred.
  • Establish which objects will likely be used as destination.

Example: at a menu with three video sources, there are two areas for exhibiting videos; any of them can show all sources options, and settings are made by the user logged on. In this case, it is possible to drag any video’s source and drop it at one of the two exhibition areas. As seen previously, the video options are the starting point, and the exhibition area is the destination. The properties to be transferred can be the name of the source, the number of the camera, or any other property that can display the video.

Events

To implement the three phases of drag-and-drop event, you will need three different events from E3:

  1. Clicking: for this phase, use the source-object’s MouseDown event. At this event, you must capture (via scripts) all the desired properties and send them to internal tags, data objects (XObjects) developed to receive this data, etc.
  2. Releasing the button: at the destination-object, MouseUp event must make all desired properties receive the values captured at Click event.
  3. Dragging: to detect the arrival of the mouse to the destination-object, you must use OnMouseOver user event, created with the object’s MouseOver property (when TRUE). At this script, use SetFocus() method.

Final remarks

After the three events have been assembled, with their respective scripts, just run the project and check its functionalities. Although some restrictions may occur with this method (for example, lack of support for MS-Forms), it will be enough for implementing this resource in a project.

Attachments:

Drag N drop.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *