OnDragOver picture event


Declaration
 ENTRY OnDragOver(IN INT _refID, OUT BOOL _bAllow)
 ; actions
 END OnDragOver 
Parameters
_refIdFor global handler - identifier of target graphic object.
_bAllowDefines, whether a graphic object is able process Drop operation.
Description
Picture event is generated over a target graphic object when a user moves the mouse cursor over it during Drag operation.
There must be determined whether the target graphic object is able to process Drop operation. This can be done globally if the graphic object cannot take a role of the target object, or based on the format of transferred data. The format can be get by the function %IsDragData.
If the data format is suitable for processing in the graphic object, the target object should enable Drop operation through the parameter _bAllow. Based on this value, a mouse cursor icon, which indicates the possible completion of Drop operation, will be set.
Example
 ENTRY OnDragOver (IN INT _refID, OUT BOOL _bAllow)
 
 ; test on admissibility of target object
 _bAllow := @FALSE
 
 IF _refId=???? THEN
  ; what data I have? I can work only with a text
  IF %IsDragData (0, _DF_TEXT) THEN
    _bAllow := @TRUE
  ENDIF
 IF
  IF %IsDragData (0, _DF_IPS) THEN
   INT _cnt
   _cnt := %GetDragDataIPS (0)
   _bAllow := @TRUE
  END IF 
 END OnDragOver 

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