Hi,
I try to disable the creating of boxes and arrows. with event RequestCreateArrow.
But this does not work in my case. As a workaround i coded the RequestAttachAroow event. This is working fine by not allowing the arrow to be attached. But it is quite annoying that the user could try. How could i resolve this?
I am using version 3.2.3
In my flowchart the only thing the user is allowed to do is double click and dragging boxes.
I include my Vb code for clarification.
Regards,
Teun
Private Sub flwModel_RequestCreateArrow(ByVal arrow As FLOWCHARTLibCtl.IArrowItem, pbCreate As Boolean)
'+ 'Description: ' Request Create Arrow event - prevent user from attaching arrow to a different ' box 'Arguments: [IN] arrow - the arrow being modified ' [IN] changingOrg - True if moving arrow start point, False if end point ' [IN] obj - Object arrow is to be attached to ' [OUT] attach - True to allow modification of arrow, False to cancel it '- On Error GoTo errHandler:
Const strPROCEDURE As String = "flwModel_RequestCreateArrow"
pbCreate = False
Exit Sub errHandler: If gobjError.ErrSet = False Then Call gobjError.SetError(Err.Number, Err.Description, mstrMODULE, strPROCEDURE, gstrCOMPONENT) End If mblnError = True Call gobjError.ShowError Call gobjError.ClearError Call subUnloadForm(Me) End Sub
Private Sub flwModel_RequestAttachArrow(ByVal arrow As FLOWCHARTLibCtl.IArrowItem, _ ByVal changingOrg As Boolean, _ ByVal obj As Object, _ attach As Boolean) '+ 'Description: ' Request Attach Arrow event - prevent user from attaching arrow to a different ' box 'Arguments: [IN] arrow - the arrow being modified ' [IN] changingOrg - True if moving arrow start point, False if end point ' [IN] obj - Object arrow is to be attached to ' [OUT] attach - True to allow modification of arrow, False to cancel it '- On Error GoTo errHandler:
Const strPROCEDURE As String = "flwModel_RequestAttachArrow"
attach = False
Exit Sub errHandler: If gobjError.ErrSet = False Then Call gobjError.SetError(Err.Number, Err.Description, mstrMODULE, strPROCEDURE, gstrCOMPONENT) End If mblnError = True Call gobjError.ShowError Call gobjError.ClearError Call subUnloadForm(Me)
End Sub
|