Type | Description | |||
ElementFrom as Element | An Element object that specifies where the link starts from. | |||
ElementTo as Element | An Element object that specifies where the link ends to. | |||
Cancel as Boolean | (By Reference) A Boolean expression that specifies whether the operation is canceled or allowed, or if the link will or will not be added. |
The following VB sample prevents adding cycles to the chart:
Private Sub SwimLane1_AllowLink(ByVal ElementFrom As EXSWIMLANELibCtl.IElement, ByVal ElementTo As EXSWIMLANELibCtl.IElement, Cancel As Boolean) Cancel = ElementTo.PathTo(ElementFrom) End Sub
The order of the events when the user links two elements at runtime is:
The AllowLink event is not called during the LoadXML method.
Syntax for AllowLink event, /NET version, on:
private void AllowLink(object sender,exontrol.EXSWIMLANELib.Element ElementFrom,exontrol.EXSWIMLANELib.Element ElementTo,ref bool Cancel) { } Private Sub AllowLink(ByVal sender As System.Object,ByVal ElementFrom As exontrol.EXSWIMLANELib.Element,ByVal ElementTo As exontrol.EXSWIMLANELib.Element,ByRef Cancel As Boolean) Handles AllowLink End Sub |
private void AllowLink(object sender, AxEXSWIMLANELib._ISwimLaneEvents_AllowLinkEvent e) { } void OnAllowLink(LPDISPATCH ElementFrom,LPDISPATCH ElementTo,BOOL FAR* Cancel) { } void __fastcall AllowLink(TObject *Sender,Exswimlanelib_tlb::IElement *ElementFrom,Exswimlanelib_tlb::IElement *ElementTo,VARIANT_BOOL * Cancel) { } procedure AllowLink(ASender: TObject; ElementFrom : IElement;ElementTo : IElement;var Cancel : WordBool); begin end; procedure AllowLink(sender: System.Object; e: AxEXSWIMLANELib._ISwimLaneEvents_AllowLinkEvent); begin end; begin event AllowLink(oleobject ElementFrom,oleobject ElementTo,boolean Cancel) end event AllowLink Private Sub AllowLink(ByVal sender As System.Object, ByVal e As AxEXSWIMLANELib._ISwimLaneEvents_AllowLinkEvent) Handles AllowLink End Sub Private Sub AllowLink(ByVal ElementFrom As EXSWIMLANELibCtl.IElement,ByVal ElementTo As EXSWIMLANELibCtl.IElement,Cancel As Boolean) End Sub Private Sub AllowLink(ByVal ElementFrom As Object,ByVal ElementTo As Object,Cancel As Boolean) End Sub LPARAMETERS ElementFrom,ElementTo,Cancel PROCEDURE OnAllowLink(oSwimLane,ElementFrom,ElementTo,Cancel) RETURN |
<SCRIPT EVENT="AllowLink(ElementFrom,ElementTo,Cancel)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function AllowLink(ElementFrom,ElementTo,Cancel) End Function </SCRIPT> Procedure OnComAllowLink Variant llElementFrom Variant llElementTo Boolean llCancel Forward Send OnComAllowLink llElementFrom llElementTo llCancel End_Procedure METHOD OCX_AllowLink(ElementFrom,ElementTo,Cancel) CLASS MainDialog RETURN NIL void onEvent_AllowLink(COM _ElementFrom,COM _ElementTo,COMVariant /*bool*/ _Cancel) { } function AllowLink as v (ElementFrom as OLE::Exontrol.SwimLane.1::IElement,ElementTo as OLE::Exontrol.SwimLane.1::IElement,Cancel as L) end function function nativeObject_AllowLink(ElementFrom,ElementTo,Cancel) return |