Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic can't  create outgoing arrows from smaller tables (Read 2374 times)
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
can't  create outgoing arrows from smaller tables
Sep 28th, 2009 at 4:25pm
Print Post  
hi, I have three tables, one large and two smaller conneted tables, I can't create outgoing arrows from the two smaller tables. I tried setting textbox1.allowoutgoingarrows = true for both tables at the bottom of the code but it doesn't seem to allow me to create and drag arrows from them. Here is my code below:

MindFusion.FlowChartX.Table textBox = new MindFusion.FlowChartX.Table(strategyFlowChart);
textBox.EnableStyledText = true;
textBox.Selected = false;
Graphics graphics = Graphics.FromHwnd(this.Handle);
graphics.PageUnit = GraphicsUnit.Millimeter;
textBox.RowHeight = _smallFont.GetHeight(graphics) + 2;
textBox.Font = _smallFont;
RectangleF rect = textBox.BoundingRect;
rect.X = addPairsMouseDownPoint.X;
rect.Y = addPairsMouseDownPoint.Y;
Console.WriteLine(rect.X + ", " + rect.Y);
rect.Width = 50;
textBox.SetRect(rect, false);

float xoffset = 71;
float yoffset = 35;

SymbolGroupNode nodeType = new SymbolGroupNode(textBox);
Group group = _editorStrategy.CreateSymbolGroup();
nodeType.Group = group as SymbolGroup;
group.Name = "P1";
textBox.Caption = "P1";


strategyFlowChart.Add(textBox);
textBox.Move(rect.X + xoffset, rect.Y + yoffset);

StrategyChanged(this, EventArgs.Empty);
SymbolAdded();
textBox.FillColor = Color.Moccasin;

// MindFusion.FlowChartX.Box textBox1 = strategyFlowChart.CreateBox(rect.X + 4 + xoffset, rect.Y + 20 + yoffset, 10, 10);
MindFusion.FlowChartX.Table textBox1 = strategyFlowChart.CreateTable(rect.X + 4 + xoffset, rect.Y + 20 + yoffset, 10, 10);
//textBox1.PolyTextLayout = true;
textBox1.EnableStyledText = true;
//textBox1.Text = "P1-A";
textBox1.Selected = false;
textBox1.AttachTo(textBox, MindFusion.FlowChartX.AttachToNode.BottomLeft);
textBox1.Locked = true;
//textBox1.Style = MindFusion.FlowChartX.BoxStyle.Shape;
//textBox1.Shape = MindFusion.FlowChartX.ShapeTemplate.OffpageReference;
strategyFlowChart.Add(textBox1);

IndicatorGroupNode AnodeType = new IndicatorGroupNode(textBox1);
Group Agroup = _editorStrategy.CreateIndicatorGroup();
AnodeType.Group = Agroup as IndicatorGroup;
Agroup.Name = "P1-A";
textBox1.Caption = "P1-A";
textBox1.FillColor = Color.Moccasin;
textBox1.TextColor = Color.Black;

//MindFusion.FlowChartX.Box textBox2 = strategyFlowChart.CreateBox(rect.X + 36 + xoffset, rect.Y + 20 + yoffset, 10, 10);
//textBox2.PolyTextLayout = true;
MindFusion.FlowChartX.Table textBox2 = strategyFlowChart.CreateTable(rect.X + 36 + xoffset, rect.Y + 20 + yoffset, 10, 10);
textBox2.EnableStyledText = true;
textBox2.Selected = false;
textBox2.AttachTo(textBox, MindFusion.FlowChartX.AttachToNode.BottomRight);
textBox2.Locked = true;
//textBox2.Style = MindFusion.FlowChartX.BoxStyle.Shape;
//textBox2.Shape = MindFusion.FlowChartX.ShapeTemplate.OffpageReference;
strategyFlowChart.Add(textBox2);

IndicatorGroupNode BnodeType = new IndicatorGroupNode(textBox2);
Group Bgroup = _editorStrategy.CreateIndicatorGroup();
BnodeType.Group = Bgroup as IndicatorGroup;
Bgroup.Name = "P1-B";
textBox2.Caption = "P1-B";
textBox2.FillColor = Color.Moccasin;
textBox2.TextColor = Color.Black;

textBox.SubordinateGroup.AutoDeleteItems = true;
textBox2.AllowOutgoingArrows = true;
textBox1.AllowOutgoingArrows = true;
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: can't  create outgoing arrows from smaller tab
Reply #1 - Sep 28th, 2009 at 6:38pm
Print Post  
Hi,

If you mean the textBox tables, I suppose it's because their Locked property is enabled.

Stoyan
  
Back to top
 
IP Logged
 
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: can't  create outgoing arrows from smaller tab
Reply #2 - Sep 28th, 2009 at 6:53pm
Print Post  
hi,
that works!
but how can I set the two smaller textboxs so that I can't resize them if I set textbox.locked = false;
  
Back to top
 
IP Logged
 
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: can't  create outgoing arrows from smaller tab
Reply #3 - Sep 28th, 2009 at 7:13pm
Print Post  
Another problem is that I can't allow the smaller tables to be seperated from the larger table, so if I set the locked property to false I can seperate them. Also I can't change the color of the text inside the tables. When I set the color property 'textbox.textcolor = Color.Black' the text in the teable still shows up as white. Why?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: can't  create outgoing arrows from smaller tab
Reply #4 - Sep 29th, 2009 at 5:33am
Print Post  
Hi,

Set the EnabledHandles property to None to prevent moving the tables. If that text is the table's Caption, set CaptionColor instead of TextColor.

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