Property: Position for PageDropContext
- Updated2024-09-12
- 2 minute(s) read
DIAdem REPORT > Properties > Property: Position for PageDropContext
Property: Position for PageDropContext
Specifies the position in the worksheet onto which you dragged and dropped an object.
Set oDropPosition = Object.Position
| Object | PageDropContext Object with this property |
| oDropPosition | DropPosition Returned object |
![]() | Note To test the example script, you must first save the script and register the script as a user command in the dialog box that opens when you select Settings»Extensions»User Commands. |
The example executes the user command MyOnDropPageEvent when dragging groups, channels, or properties onto a worksheet. The user command displays the names of the elements that you dragged onto an object. In addition the user command displays to which position you dragged the elements. The user command receives two parameters. The first parameter corresponds to a PageDropContext object and provides information about the worksheet onto which you dragged and dropped an object. The second parameter corresponds to a DropInformation object and provides information about the object which you dragged and dropped onto another object:
Call AddUserCommandToEvent("Report.Events.OnDropPage", "MyOnDropPageEvent") Sub MyOnDropPageEvent(Context, DropContext) Dim oMyDropElement, sOutput, oMyComment sOutput = "Names of dropped elements:" For Each oMyDropElement in DropContext.DiademElements sOutput = sOutput & VBCrLf & oMyDropElement.Name Next Call Msgbox(sOutput) Call MsgBox(Context.Sheet.Name & VBCrLf & Context.Position.X & VBCrLf & Context.Position.Y) Context.DoProceed = TRUE End Sub
