Navigation: Language Reference > 13 - Built-in Functions >====== SETDROPID (set DROPID return string) ====== | |
SETDROPID( string )
SETDROPID | Sets the DROPID procedure's return value. |
string | A string constant or variable containing the value the DROPID procedure will return. |
The SETDROPID procedure sets the DROPID procedure's return value. This allows the DROPID procedure to pass the data in a drag-and-drop operation. When drag-and-drop operations are performed between separate Clarion applications, this is the mechanism to use to pass the data.
Example:
Que1 QUEUE
STRING(30)
END
Que2 QUEUE
STRING(30)
END
WinOne WINDOW,AT(0,0,160,400)
LIST,AT(120,0,20,20),USE(?List1),FROM(Que1),DRAGID('List1')
!Allows drags, but not drops
LIST,AT(120,120,20,20),USE(?List2),FROM(Que2),DROPID('List1')
!Allows drops from List1 or the Windows File Manager,
!but no drags
END
CODE
OPEN(WinOne)
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, from List1 or File Manager
ADD(Que2) !and add it to the queue
END
END
See Also: