Event: EventDrop

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Is triggered when you drag and drop an element from the Data Portal to a channel selection list. The event can only be triggered if Dropping is permitted. The event is triggered if the cursor is above the channel selection list and you release the left mouse button.

EventDrop(ByRef This, DropInformation, ByRef DoProceed)
This Object that triggers this event.
DropInformation DropInformation object
Contains information about the element which you drag and drop onto the channel selection list.
DoProceed Specifies whether DIAdem executes standard actions such as selecting a channel in the channel selection list after executing the EventDrop event (True) or (False).

The following example only allows the drop process if you drag a numeric channel from the Data Portal onto the channel selection list ChnListBox1. You cannot drop a data set or a channel group. If dropping is permitted, the example outputs the name and the length of the first selected channel.

Sub ChnListBox1_EventDropAllowed(ByRef This, DropInformation, ByRef DropEffect)
Dim oMyElem
  Set oMyElem = DropInformation.DiademElements
  DropEffect = eDropEffectNone  
  If oMyElem.Count > 0 Then
    If oMyElem(1).IsKindOf(eDataChannel) Then
      If oMyElem(1).DataType = DataTypeFloat64 Then 
        DropEffect = eDropEffectCopy
      End If 
    End If
  End If
End Sub

Sub ChnListBox1_EventDrop(ByRef This, DropInformation, ByRef DoProceed)
  Call MsgBoxDisp(DropInformation.DiademElements(1).Name & " / " & DropInformation.DiademElements(1).Size)
  ' further instructions
End Sub

WAS THIS ARTICLE HELPFUL?

Not Helpful