DRAGID (return matching drag-and-drop signature)

Top  Previous  Next

 

DRAGID( [thread] [, control] )

DRAGID

Returns matching host and target signatures on a successful drag-and-drop operation.

thread

The label of a numeric variable to receive the thread number of the host control. If the host control is in an external program, thread receives zero (0).

control

The label of a numeric variable to receive the field equate label of the host control.

The DRAGID procedure returns the matching host and target control signatures on a successful drag-and-drop operation. If the user aborted the operation, DRAGID returns an empty string (''), otherwise it returns the first signature that matched between the two controls.

Return Data Type:

STRING

Example:

Que1 QUEUE

     STRING(30)

    END

Que2 QUEUE(Que1)           !Que2 declared same as Que1

    END

Que3 QUEUE(Que1)           !Que3 declared same as Que1

    END

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

       !Allows drags, but not drops:

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

       !Allows drops from List1 or List3, but no drags:

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

       !Allows drags, but not drops:

       LIST,AT(120,240,20,20),USE(?List3),FROM(Que3),DRAGID('List3')

      END

CODE

OPEN(WinOne)

ACCEPT

 CASE EVENT()

  OF EVENT:Drop           !When drop event is successful

   CASE DRAGID()          !check for which host dropped it

    OF 'List1'

     Que2 = Que1          !get dropped info from Que1

    OF 'List3'

     Que2 = Que3          !get dropped info from Que3

   END

  ADD(Que2)               !add either one to the drop queue

 END

END

 

See Also:

DROPID

SETDROPID