Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic insert a custom table (Read 4728 times)
Joe
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
insert a custom table
Jun 21st, 2012 at 3:36am
Print Post  
How to do to insert a custom table on the diagram and set its properties? Example:PowerPoint
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: insert a custom table
Reply #1 - Jun 21st, 2012 at 6:55am
Print Post  
You could use a TableNode:

Code
Select All
var table = diagram.Factory.CreateTableNode(rect, cols, rows);
table.Caption = "my table";
table[0, 0].Text = "my first cell"; 



Alternatively, add an instance of your favorite grid control via DiagramNodeAdapter.

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


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
Re: insert a custom table
Reply #2 - Jun 21st, 2012 at 7:30am
Print Post  
But it can not be edited.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: insert a custom table
Reply #3 - Jun 21st, 2012 at 7:42am
Print Post  
If you set AllowInplaceEdit to true, you can enter edit mode by double clicking a cell. You could also call BeginEdit() from a CellClicked handler to start edit mode after a single-click, or enter it automatically after creating the table.
  
Back to top
 
IP Logged
 
Joe
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
Re: insert a custom table
Reply #4 - Jun 21st, 2012 at 8:03am
Print Post  
I see ,thank y 。But how to hide the table header。
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: insert a custom table
Reply #5 - Jun 21st, 2012 at 8:07am
Print Post  
Set CaptionHeight to 0.
  
Back to top
 
IP Logged
 
Joe
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
Re: insert a custom table
Reply #6 - Jun 21st, 2012 at 8:15am
Print Post  
When I drag table sizeForm only length adaptive, not highly also adaptive?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: insert a custom table
Reply #7 - Jun 21st, 2012 at 8:40am
Print Post  
You can resize rows from the NodeModified handler if they should divide the table's height between them.

Code
Select All
void diagram_NodeModified(object sender, NodeEventArgs e)
{
	TableNode table = e.Node as TableNode;
	if (table != null)
	{
		double rowHeight = (table.Bounds.Height - table.CaptionHeight) / table.RowCount;
		foreach (TableNode.Row row in table.Rows)
			row.Height = rowHeight;
	}
} 



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


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
Re: insert a custom table
Reply #8 - Jun 25th, 2012 at 1:00am
Print Post  
I like what you said to set up, but after drawing second lines form frame line is not, such as maps, and cell cannot support the tensile change width, height, And so on
  

__26410___21629___21517_.JPG (Attachment deleted)
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint