Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic text disapearing when I resize table (Read 3732 times)
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
text disapearing when I resize table
Sep 29th, 2009 at 4:36pm
Print Post  
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;
« Last Edit: Sep 29th, 2009 at 8:18pm by chuckdawit »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text disapearing when I resize table
Reply #1 - Oct 5th, 2009 at 10:28am
Print Post  
Could you save this to xml and email the file to support@mindfusion.eu?
  
Back to top
 
IP Logged
 
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: text disapearing when I resize table
Reply #2 - Oct 5th, 2009 at 5:03pm
Print Post  
how do I xml this piece of code snippet?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text disapearing when I resize table
Reply #3 - Oct 5th, 2009 at 5:54pm
Print Post  
Call the FlowChart.SaveToXml method if you have it in your version, or otherwise use the XmlWriter class' Write method.
  
Back to top
 
IP Logged
 
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: text disapearing when I resize table
Reply #4 - Oct 6th, 2009 at 11:40pm
Print Post  
Hi,
I can't paste the xml file into the reply, its too long. Can I email it to you?
  
Back to top
 
IP Logged
 
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: text disapearing when I resize table
Reply #5 - Oct 6th, 2009 at 11:43pm
Print Post  
In addition to hidding the text the tables also resize the form screen. When I let go of the mouse and create the symbol the size of the grid on my form grows. Any thoughts on that? ???
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text disapearing when I resize table
Reply #6 - Oct 7th, 2009 at 6:45am
Print Post  
Is that "P1" text from the file disappearing? The diagram might grow automatically if its AutoResize property is enabled. You might also check if some code in the NodeCreated handler sets diagram.Bounds.
  
Back to top
 
IP Logged
 
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: text disapearing when I resize table
Reply #7 - Oct 7th, 2009 at 4:32pm
Print Post  
Yes. Both P1, P1-A and P1-B and any text in the P1 table gets set to a state where I can't see the any of the text. It only happens when I click on the symbol and drag it to resize it.
  
Back to top
 
IP Logged
 
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
Re: text disapearing when I resize table
Reply #8 - Oct 7th, 2009 at 5:08pm
Print Post  
funny thing! When I create my symbol on my local machine none of the text disappears, but when I create the symbol on one of our servers while I'm remotely connected I see the text disappear. Also noted, the server is a virtual machine. It looks like the 'autosizedoc' property helped to stop the graph from growing when the symbol is created, so that worked. But I'm still having a problem with the placement of the symbol when it gets created. I'm trying to use the current location of the mouse down event and place the symbol, but it seems like every pc I use creates the symbol in a different location on the graph. I'm using table.move(float x, float y) to try and set the location.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text disapearing when I resize table
Reply #9 - Oct 8th, 2009 at 7:05am
Print Post  
If you don't need formatted text, try that with EnableStyledText set to false.

What kind of coordinates are you calling table.Move with? If you are getting them from events derived form Control, e.g. MouseDown or MouseMove, you must first convert them to diagram coordinates using the ClientToDoc method.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint