Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrow.OriginTable.RowFromPoint (Read 3334 times)
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Arrow.OriginTable.RowFromPoint
Jul 8th, 2011 at 6:49am
Print Post  
Hi,

The following code always returns -1

Code
Select All
oArrow:OriginTable:RowFromPoint(oArrow.CtrlPtX(0), oArrow.CtrlPtY(0)) 



To find the origin of the arrow I need to make

Code
Select All
if (nRow := oArrow:OriginTable:RowFromPoint(oArrow:CtrlPtX(0)-1, oArrow:CtrlPtY(0)) == -1
   nRow := oArrow:OriginTable:RowFromPoint(oArrow:CtrlPtX(0)+1, oArrow:CtrlPtY(0)
endif
 



Is this the only way or am I missing something?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow.OriginTable.RowFromPoint
Reply #1 - Jul 8th, 2011 at 8:08am
Print Post  
Hi,

You can use the arrow's OrgnIndex and DestIndex properties instead.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Re: Arrow.OriginTable.RowFromPoint
Reply #2 - Jul 8th, 2011 at 1:48pm
Print Post  
Thank you Stoyo, that was it.

But both properties are readonly. How can I assign a link to a row programatically? do I have to define anchorpoints for every row?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow.OriginTable.RowFromPoint
Reply #3 - Jul 8th, 2011 at 2:32pm
Print Post  
You can use the table's ChangeRelation method for that. Apart from the row, that method can also change the arrow's origin or destination table with the same call.
  
Back to top
 
IP Logged
 
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Re: Arrow.OriginTable.RowFromPoint
Reply #4 - Jul 8th, 2011 at 3:23pm
Print Post  
Thank you, I'll try that
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint