User Tools

Site Tools


dragid_set_drag_and_drop_host_signatures_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes >====== DRAGID (set drag-and-drop host signatures) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

DRAGID( signature [, signature] )

blk2blue.jpg

DRAGID Specifies a LIST or REGION control that can serve as a drag-and-drop host.
signature A string constant containing an identifier used to indicate valid drop targets. Any signature that begins with a tilde (~) indicates that the information can also be dragged to an external (Clarion) program. A single DRAGID may contain up to 16 signatures. The drag signature cannot start with an exclamation mark (!).

The DRAGID attribute (PROP:DRAGID, an array) specifies a LIST or REGION control that can serve as a drag-and-drop host. DRAGID works in conjunction with the DROPID attribute. The DRAGID signature strings (up to 16) define validation keys to match against the signature parameters of the target control's DROPID. (The drag signature cannot start with an exclamation mark “!” ) This provides control over where successful drag-and-drop operations are allowed.

A drag-and-drop operation occurs when the user drags information from a control with the DRAGID attribute to a control with the DROPID attribute. For a successful drag-and-drop operation, both controls must have at least one identical signature string in their respective DRAGID and DROPID attributes.

Example:

WinOne WINDOW,AT(0,0,160,400)

       !Allows drags, but not drops:

       LIST,AT(120,0,20,20),USE(?List1),FROM(Que1),DRAGID('FromList1')

       !Allows drops from List1, but no drags

       LIST,AT(120,120,20,20),USE(?List2),FROM(Que2),DROPID('FromList1')

      END

CODE

OPEN(WinOne)

!Drag and Drop Ids can also be assigned at runtime

?List2{PROP:DropID,1) = 'FromList1'

?List1{PROP:DragID,1) = 'FromList1'

!* ACCEPT  CASE EVENT()  OF EVENT:Drag       !When a drag event is attempted   IF DRAGID()        !check for success    SETDROPID(Que1)   !and setup info to pass   END  OF EVENT:Drop       !When drop event is successful   Que2 = DROPID()    !get dropped info   ADD(Que2)          !and add it to the queue  END END See Also:**

DROPID

dragid_set_drag_and_drop_host_signatures_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)