Drag event in Smart Devices

Official Content
This documentation is valid for:

This Event is executed when content is dragged (through long-tap). It allows you to code the activity of the element to be dragged.

Syntax

Event <control>.Drag([out:&dataParameter [,&booleanParameter])
      Event_code
EndEvent

Where:

control
      The name of the form control over the drag operation is performed.

&dataParameter 
      The data parameter is only one, and it is always an out variable. It will be loaded with the data you want to drag. To drag several elements you have to load them into an SDT.

&booleanParameter
      It indicates if the Drag event can be executed. This parameter is optional and its default value is True. If set to False inside Event_code, the drag will not be allowed for that control. 

Event_code
      Code associated with the event. The &dataParameter will be loaded here with the data you want to drop into another control as a consecuence of the drag operation. To drag several elements of information you have to load them into an SDT, as mentioned above.

Example

Having the Work with for Smart Devices applied to Meeting transaction: to drag the MeetingTitle attribute (part of the List grid), the event would be as follows:

Event MeetingTitle.Drag(&Meeting,&bool)
    Composite
       &bool = True
       &Meeting.MeetingId = MeetingId
    EndComposite
EndEvent

Note: The MeetingId (primary key) attribute is always sent to the Device even if not explicitly inserted into the grid. Because of that, running the event over a MeetingTitle line, its value is known. 

To complete the example, see Drop event in Smart Devices, DropAccepted event in Smart Devices and DragCanceled event in Smart Devices.

Availability

As from GeneXus X Evolution 2 Upgrade 4.

See also

 





Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.