Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic incorrect use of LinkTextStyle.OverLongestSegment or bug? (Read 1373 times)
Dirk Frischalowski
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Location: Germany
Joined: Jun 14th, 2012
incorrect use of LinkTextStyle.OverLongestSegment or bug?
Jan 22nd, 2013 at 4:41pm
Print Post  
Hallo mindfusion team,

is there a known issue with LinkTextStyle.OverLongestSegment ?
I tried this short Code with a new created Windows Forms Project and Diagram and DiagramView on it I got a Objekt not initialized exception ... in program.cs Application.run (new Form...).

the problem is the line with link.TextStyle = LinkTextStyle.OverLongestSegment;.

On Button-click i used this code:

ShapeNode node = diagram1.Factory.CreateShapeNode(10, 10, 20, 13);
node.Text = "werwerwer";
ShapeNode node2 = diagram1.Factory.CreateShapeNode(10, 50, 20, 13);
node2.Text = "bla bla";
DiagramLink link = diagram1.Factory.CreateDiagramLink(diagram1.Nodes[0], diagram1.Nodes[1]);

link.Text = "fwerwewre";
link.TextStyle = LinkTextStyle.OverLongestSegment;
link.TextBrush = new MindFusion.Drawing.SolidBrush(Color.Blue);

Thanks for help!  Cheesy
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: incorrect use of LinkTextStyle.OverLongestSegment or bug?
Reply #1 - Jan 22nd, 2013 at 5:34pm
Print Post  
Hi,

Apparently that's some bug we introduced with the styles & themes feature. For the time being you will have to assign some value to diagram.BackBrush to avoid this.

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