Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic text attachement to link  and shapes (Read 6851 times)
SC
YaBB Newbies
*
Offline



Posts: 37
Joined: Jan 18th, 2008
text attachement to link  and shapes
Jun 7th, 2008 at 7:30pm
Print Post  
How can users be able to attach text to the link and also to the shapes that they are drawing at runtime?

Is there any way to not let users draw links from /to headers of table?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text attachement to link  and shapes
Reply #1 - Jun 8th, 2008 at 11:45am
Print Post  
Enable the AllowInplaceEdit property and users will be able to add text by double-clicking. Handle the LinkCreating and LinkModifying events to prevents users from adding links to certain rows of a table. Set ConnectionStyle = Rows to allow links only to the table's rows, but not to its header.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
SC
YaBB Newbies
*
Offline



Posts: 37
Joined: Jan 18th, 2008
Re: text attachement to link  and shapes
Reply #2 - Jun 9th, 2008 at 11:52pm
Print Post  
ConnectionStyle = Rows is wokring only for table caption but it is not working for Header rows.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text attachement to link  and shapes
Reply #3 - Jun 10th, 2008 at 6:14am
Print Post  
To reject links to header rows, handle LinkCreating and LinkModifying and set e.Cancel = true when ((TableNode)e.Node)[e.TableRow].Header == true.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
SC
YaBB Newbies
*
Offline



Posts: 37
Joined: Jan 18th, 2008
Re: text attachement to link  and shapes
Reply #4 - Jun 10th, 2008 at 4:36pm
Print Post  
This is what I have, and e.TableRow is always returning 0 for me(is it bug) irrelavent of which row I am creating the link.

void onLinkCreating(object sender, LinkValidationEventArgs e)

{
if (e.Node.GetType().Name == "TableNode")
{
if (((TableNode)e.Node).Rows[e.TableRow].Header == true)
e.Cancel = true;
}
}

I have header in my zero row so it is not letting me draw links from one table to the other irrelevant of any row but it is letting me draw links to any other shape.

My point is it is firing that onLinkCreating method couple of times, for source and destination so is it going to combine all decisions for cancelling? or it is just taking the validation alone?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text attachement to link  and shapes
Reply #5 - Jun 11th, 2008 at 10:31am
Print Post  
Ok, it was a bug. I've sent you a download link to the updated assembly and source code. Click the link at the top of the forum page to go to the private messages area.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text attachement to link  and shapes
Reply #6 - Jun 11th, 2008 at 10:34am
Print Post  
While the user is still drawing a link, the result of the Creating event affects just the mouse cursor, showing whether the operation would be accepted. The Creating event is raised for one last time when the user releases the mouse button, and setting Cancel = true then cancels the operation.
  
Back to top
 
IP Logged
 
SC
YaBB Newbies
*
Offline



Posts: 37
Joined: Jan 18th, 2008
Re: text attachement to link  and shapes
Reply #7 - Jun 11th, 2008 at 4:20pm
Print Post  
Thanks for the quick fix.
Latest code is poiting to the correct row but the problem is still not solved as the destinationlink position is always overwriting the sourcelink.

For example, if I draw link from my sourcetable header row to any other detination bnon header it still allows. I do not want link from any header whether it is source or destination table.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text attachement to link  and shapes
Reply #8 - Jun 11th, 2008 at 4:29pm
Print Post  
Check if (e.Origin as TableNode)[e.Link.OriginIndex].Header is enabled to find out whether the user started drawing from a header row. I suppose in that case it's best to call e.CancelDrag() to stop the operation immediately.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint