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;
|