Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic [RESOLVED] Auto snap created arrow on input anchor (Read 3125 times)
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
[RESOLVED] Auto snap created arrow on input anchor
Apr 20th, 2007 at 10:11am
Print Post  
Hi,

I have a box "box1" with an anchor pattern wich contain Output AnchorPoints, and a second box "box2" with another anchor pattern wich contain one input anchor point.

My flowChart behavior property is set to "CreateArrow", and when I create an arrow from my Box1 to my Box2, the arrow doesn't automaticly snap to input AnchorPoint but is snap to position of the mouse on the box2 when creation end.

How can I do to automaticaly snap arrow end to input anchorpoint ?
« Last Edit: Apr 20th, 2007 at 12:05pm by belfaigore »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automaticaly snap creating arrow on input anch
Reply #1 - Apr 20th, 2007 at 10:43am
Print Post  
Hi,

Could you post here the code that initializes the anchor points? Do you by any chance handle the ValidateAnchorPoint event?

Stoyan
  
Back to top
 
IP Logged
 
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
Re: Automaticaly snap creating arrow on input anch
Reply #2 - Apr 20th, 2007 at 10:49am
Print Post  
I don't handle the ValidateAnchorPoint event

Here is my code that générate the AnchorPattern for my component
Code
Select All
	  ''' <summary>
	  ''' Cette fonction permet de retourner les point d'ancrage de l'objet
	  ''' </summary>
	  ''' <remarks></remarks>
	  Public Function GetAnchorPattern() As MindFusion.Diagramming.WinForms.AnchorPattern

		'
		' Définie les point d'ancrage (Pourcentage)
		'
		Dim Points As New AnchorPattern
		With Points.Points
		    .Clear()
		    '
		    ' Entrèe du Capteur : Entrée
		    '
		    Dim Point As New AnchorPoint(0, 50)
		    With Point
			  .AllowIncoming = True
			  .AllowOutgoing = False
			  .Color = _AnchorPoint_CaptorMarkColor
			  .MarkStyle = _AnchorPoint_CaptorMarkStyle
			  .ToolTip = "Entrée capteur"
			  .Tag = "Entrée"
		    End With
		    .Add(Point)
		    Point = Nothing
		    '
		    ' Sortie du Capteur : Sortie
		    '
		    Point = New AnchorPoint(100, 50)
		    With Point
			  .AllowIncoming = False
			  .AllowOutgoing = True
			  .Color = _AnchorPoint_OutputMarkColor
			  .MarkStyle = _AnchorPoint_OutputMarkStyle
			  .ToolTip = "Sortie du capteur"
			  .Tag = "Sortie"
		    End With
		    .Add(Point)
		    Point = Nothing

		End With

		Return Points

	  End Function 



and after
Code
Select All
Dim Table As New Table(MyFlowChart)
Table.AnchorPattern = GetAnchorPattern() 

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automaticaly snap creating arrow on input anch
Reply #3 - Apr 20th, 2007 at 10:58am
Print Post  
Thank you, and what is the Table.LinkStyle?
  
Back to top
 
IP Logged
 
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
Re: Automaticaly snap creating arrow on input anch
Reply #4 - Apr 20th, 2007 at 11:40am
Print Post  
I don't know for what this property is used, the value can be "Rows", "Table" or "Both".
I'll tryed to set the different value but nothing append on runtime.

I Know the FlowChart property "SnapToAnchor" wich is set to "OnCreatedOrModify" but the correct behavior is apply only to my Box component and not to the table component
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automaticaly snap creating arrow on input anch
Reply #5 - Apr 20th, 2007 at 11:49am
Print Post  
If an arrow links to a table's row, which is the case when LinkStyle is Rows or Both, the control uses the points from Table.RowAnchorPattern. So try assigning your points to that property.

Stoyan
  
Back to top
 
IP Logged
 
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
Re: Automaticaly snap creating arrow on input anch
Reply #6 - Apr 20th, 2007 at 12:04pm
Print Post  
Thanks a lot, it solve my trouble.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint