OnDragEnd picture event


Declaration
 ENTRY OnDragEnd(IN INT _refID, IN INT _dropped)
 ; action
 END OnDragEnd 
Parameters
_refIdFor global event handler - identifier of source graphic object.
_droppedContains identifier of data transfer type that was done when executing Drop operation. Possible values:
  • dtNone => 0 (aborted Drag operation by a user)
  • dtCopy => 1
  • dtMove => 2
  • dtShortCut => 4
Description
Picture event is generated when a user releases left-mouse button after starting Drag operation. Within event handler, there must be detected what type of data transfer (copying, moving, creating a link) a user wants to do and accordingly to change or keep the contents of graphic object.
If the data transfer type (given by dropped parameter) is moving, the selected element must be removed from the graphic object.
Example
 ENTRY OnDragEnd (IN INT _refID, IN INT _dropped)
 INT _idxSel
 IF _dropped = 2 THEN
 _idxSel := %HI_GetSelectedItem(_refId)
 CALL RemoveItem(_refId, _idxSel)
 END IF 
 END OnDragEnd 

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ť .