my text (both caption and row text) disappears when I re size my table 'textbox' horizontally. If I drag the table horizontally to the right the text disappears and then reappears and then disappears and then reappears, etc, etc. Any thoughts??? In addition, when I create the table on the canvas on the left side of the canvas everything gets populated correctly (all text in the tables) but when I create the table on the right hand side of the canvas some of the text doesn't get populated when the table is first created. Any thoughts on this???
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 = 60; 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.White;
// 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, 15, 10); //textBox1.PolyTextLayout = true; textBox1.EnableStyledText = true; //textBox1.Text = "P1-A"; textBox1.Selected = false; textBox1.AttachTo(textBox, MindFusion.FlowChartX.AttachToNode.BottomLeft); textBox1.Locked = false; textBox1.EnabledHandles = MindFusion.FlowChartX.Handles.None; //textBox1.Style = MindFusion.FlowChartX.BoxStyle.Shape; //textBox1.Shape = MindFusion.FlowChartX.ShapeTemplate.OffpageReference; strategyFlowChart.Add(textBox1);
IndicatorGroupNode AnodeType = new IndicatorGroupNode(textBox1); IndicatorGroup Agroup = (IndicatorGroup)_editorStrategy.CreateIndicatorGroup(); AnodeType.Group = Agroup as IndicatorGroup; Agroup.Name = "P"; //textBox1.Caption = "P1-A"; textBox1.FillColor = Color.White; textBox1.CaptionColor = 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 + 38 + xoffset, rect.Y + 20 + yoffset, 15, 10); textBox2.EnableStyledText = true; textBox2.Selected = false; textBox2.AttachTo(textBox, MindFusion.FlowChartX.AttachToNode.BottomRight); textBox2.Locked = false; textBox2.EnabledHandles = MindFusion.FlowChartX.Handles.None; //textBox2.Style = MindFusion.FlowChartX.BoxStyle.Shape; //textBox2.Shape = MindFusion.FlowChartX.ShapeTemplate.OffpageReference; strategyFlowChart.Add(textBox2);
IndicatorGroupNode BnodeType = new IndicatorGroupNode(textBox2); IndicatorGroup Bgroup = (IndicatorGroup)_editorStrategy.CreateIndicatorGroup(); BnodeType.Group = Bgroup as IndicatorGroup; Bgroup.Name = "P"; //textBox2.Caption = "P1-B"; textBox2.FillColor = Color.White; textBox2.TextColor = Color.Black; textBox2.CaptionColor = Color.Black;
textBox.SubordinateGroup.AutoDeleteItems = true; textBox2.AllowOutgoingArrows = true; textBox1.AllowOutgoingArrows = true;
Agroup.InputGroups.Add(1, group); Bgroup.InputGroups.Add(1, group); group.OutputGroups.Add(Agroup.Id, Agroup); group.OutputGroups.Add(Bgroup.Id, Bgroup);
StratProgram Aprogram = new OperatorProgram(-1, "Symbol-A"); Aprogram.Code = @"@(progn [series 0]) :minimum-inputs 2 :maximum-inputs 2 :truncated t";
StratProgram Bprogram = new OperatorProgram(-1, "Symbol-B"); Bprogram.Code = @"@(progn [series 0][nth-series 1 0]) :truncated t";
AnodeType.AddProgram(Aprogram); BnodeType.AddProgram(Bprogram);
textBox2.CaptionHeight = 0.0F; textBox1.CaptionHeight = 0.0F; textBox1.Expandable = false;
|