Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

OnDragStart picture event


Declaration
Blok kódu
languageesl
themeConfluence
 ENTRY OnDragStart(IN INT _refId)
 ; actions
 END OnDragStart 
Parameters
_refIdReference variable of source graphic object.
Description
Picture event is generated when a user clicks the left-mouse button and starts dragging the selected object. To execute Drag operation, data, which are to be transferred, must be prepared first.
With the help of functions:
- %HI_GetBrowserMultiselect
- %HI_GetSelectedItem
- %HI_GetItemText

you can find out which elements are selected in the graphic objects. Based on the detected state, you may decide whether the operation Drag is to be done.
If yes, the necessary data must be prepared with the help of these functions:
- %SetDragDataText
- %SetDragDataFileList
- %SetDragDataIPS

Then call the function %HI_DoDragDrop.

If this function is not called, Drag operation will not be executed.
Example
Blok kódu
languageesl
themeRDark
 ENTRY OnDragStart (IN INT _refID)
 
 ; creating data for D&D, e.g. only text
 %SetDragDataText (0, "Textová hodnota")
 
 ; initiating Drag&Drop
 %HI_DoDragDrop ( _refId)
 END OnDragStart