Event: EventDropAllowed

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 in user dialog boxes when an element is dragged and dropped onto a channel selection list or an entry field. The event is triggered when you move the cursor into the control. Use this event to determine whether dropping onto the control is allowed.

EventDropAllowed(ByRef This, DropInformation, ByRef DropEffect)
This Object that triggers this event.
DropInformation DropInformation object
Contains information about the element which you drag and drop onto the control.
DropEffect Specifies whether dropping is valid or not. Enumeration with the following selection terms:
eDropEffectNone Dropping is not valid.
eDropEffectCopy Dropping is valid.

In the following example dropping is only allowed if you drag a numeric channel from the Data Portal onto the channel selection list ChnComboBox1. If dropping is permitted, the example outputs the name and the length of the first selected channel.

Sub ChnComboBox1_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 ChnComboBox1_EventDrop(ByRef This, DropInformation, ByRef DoProceed)
  Call MsgBoxDisp(DropInformation.DiademElements(1).Name & " / " & DropInformation.DiademElements(1).Size)
  ' further instructions
End Sub


Not Helpful