OnDrop event


Declaration
 ENTRY OnDrop(IN INT _refId)
 ; actions
 END OnDrop 
Parameters
Description
 Picture event is generated when a user moves data to the given target graphic object. Within event handling, it is necessary to get required data and following them to modify the content of graphic object. First, there must be detected what type of data format was transferred by %IsDragData function and following it to get data in the appropriate format through these functions:To define a position for placing the new data in a target object, use these functions:Based on these data, it is necessary to modify the target graphic object to reflect the executed Drop operation.
Example
 ENTRY OnDrop (IN INT _refID)
 IF %IsDragData(0, _CF_TEXT) THEN
 TEXT _dndText
 ; getting a text
 _dndText := %GetDragDataText(0)
 
 ; finding out a position in the tree
 _tmp := %HI_TVQueryDnDItem(_refId,_node1,_node2)
 
 ; setting a new item in the tree
 CALL AddTreeItem(_refId, _dndText, _node1, _node2)
 ENDIF
 END OnDrop 

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .