Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Huge ToolTip freezes MindFusion (Read 1860 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Huge ToolTip freezes MindFusion
Oct 20th, 2014 at 6:08pm
Print Post  
Open the demo project, and set a ShapeNode's ToolTip to be a really long string (like "aaaaaaaaaaaaaa[...]"). The demo project will freeze, demonstrating this bug..
  
Back to top
 
IP Logged
 
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Re: Huge ToolTip freezes MindFusion
Reply #1 - Oct 20th, 2014 at 9:09pm
Print Post  
It will freeze when you hover over the ShapeNode so the tooltip shows, I mean.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Huge ToolTip freezes MindFusion
Reply #2 - Oct 21st, 2014 at 9:39am
Print Post  
Apparently the delay comes from .NET's ToolTip control text formatting code:
http://stackoverflow.com/questions/17877009/winfroms-tooltip-works-very-slow-for...

You could add your own line breaks to work around that:
Code
Select All
var n = diagram.Factory.CreateShapeNode(10, 10, 20, 20);
var tt = new string('a', 4000);
int lastWhitespace = 0;
for (int i = 0; i < tt.Length; i++)
{
	if (char.IsWhiteSpace(tt[i]))
		lastWhitespace = 0;
	else
		lastWhitespace++;
	if (lastWhitespace > 200)
	{
		tt = tt.Insert(i, Environment.NewLine);
		lastWhitespace = 0;
	}
}
n.ToolTip = tt; 



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