Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic can't delete boxes attached to table (Read 1687 times)
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
can't delete boxes attached to table
Sep 16th, 2009 at 7:01pm
Print Post  
I have a table with two attached boxes and when I click table on the form to delete it, the table deletes but not the two boxes attached to it. Can anyone help? I will paste the code that creates the table and two boxes and the event that gets called when the delete is pressed

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;

rect.Width = 50;
textBox.SetRect(rect, false);

float offset = 70;

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

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

MindFusion.FlowChartX.Box textBox1 = strategyFlowChart.CreateBox(rect.X + 4 + offset, rect.Y + 20 + offset, 10, 10);
//MindFusion.FlowChartX.Table textBox1 = strategyFlowChart.CreateTable(rect.X + 4 + offset, rect.Y + 20 + offset, 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);
textBox1.FillColor = Color.Moccasin;

MindFusion.FlowChartX.Box textBox2 = strategyFlowChart.CreateBox(rect.X + 36 + offset, rect.Y + 20 + offset, 10, 10);
textBox2.PolyTextLayout = true;
textBox2.EnableStyledText = true;
textBox2.Text = "P1-B";
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);
textBox2.FillColor = Color.Moccasin;




private void strategyFlowChart_TableDeleted(object sender, MindFusion.FlowChartX.TableEventArgs e)
{ //delete table stuff
}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: can't delete boxes attached to table
Reply #1 - Sep 16th, 2009 at 7:15pm
Print Post  
After attaching the boxes, set table.SubordinateGroup.AutoDeleteItems = true.

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


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: can't delete boxes attached to table
Reply #2 - Sep 16th, 2009 at 7:32pm
Print Post  
yes that works! thanks!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint