Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
OnDrop event
Declaration
Blok kódu | ||||
---|---|---|---|---|
| ||||
ENTRY OnDrop(IN INT _refId) ; actions END OnDrop |
Parameters
_refId | Reference variable of target object. |
Description
Picture Picture event is generated when a user moves data to the given target graphic object. Within event handling, there it is necessary to get a 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:
- %HI_TVQueryDnDItem – finding out the current position of data in Browser displayer
- %HI_LVQueryDnDItem – finding out the current position of data in Tree view
Example
Blok kódu | ||||
---|---|---|---|---|
| ||||
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 |
Info | ||
---|---|---|
| ||