Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic TableNode questions (Read 1064 times)
davidl
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Dec 3rd, 2007
TableNode questions
Mar 7th, 2008 at 4:21pm
Print Post  
I have 3 questions related to tablenodes and the tablenode example provided in the sample code.

1. I am trying to prevent more than 1 incomming link to be attached to a tablenode's row.  The table node has more than 1 row.   I am trying to do this in the *_LinkCreating function.  I can't find a way to prevent the link on a row with a link, but allow the link on a other rows without links. Can this be done?

2. In the sample code for TableNodes, the user can create an empty rectangle anywhere on the diagram with the left mouse.  I'd like to prevent this, but I want all of the other behaviour offered by  MindFusion.Diagramming.Behavior.LinkShapes. Can this be done?

3. I can't get the tooltip value for my tablenodes to update on the diagram.  I set the value and can see it is set in the debugger, but it does not appear correctly.  Am I doing something wrong?

Thank you very much for any help with these questions.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TableNode questions
Reply #1 - Mar 7th, 2008 at 6:32pm
Print Post  
1. Try this:

Code
Select All
private void diagram_LinkCreating(object sender, MindFusion.Diagramming.LinkValidationEventArgs e)
{
	TableNode destTable = e.Node as TableNode;
	if (destTable != null)
	{
		if (destTable.Rows[e.TableRow].IncomingLinks.Count > 0)
			e.Cancel = true;
	}
}
 



2. If you want to prevent the users from drawing nodes, but let them draw links and select items, set Behavior = DrawLinks.

3. Does the tooltip appear when you point at the table's caption? Cells have a Tooltip property too, and the table's one might not be displayed when the mouse is over a cell.

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