Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Style for tooltips (Read 3835 times)
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Style for tooltips
Apr 19th, 2013 at 11:52pm
Print Post  
Hi,

Can i apply styles for tooltip? I need to give a background color and a border for tooltip.

Is there any way to show multiline messages in tooltip?

Thanks
Kiran B
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Style for tooltips
Reply #1 - Apr 22nd, 2013 at 7:29am
Print Post  
Hi,

At this time you can change the tooltips style only by overriding the diagram's onTooltip function:

Code
Select All
var Diagram = MindFusion.Diagramming.Diagram;
var originalOnTooltip = Diagram.prototype.onTooltip;
Diagram.prototype.onTooltip = function ()
{
	originalOnTooltip.apply(this);
	if (this.tooltipDiv)
	{
		this.tooltipDiv.style.background = "lightGray";
		this.tooltipDiv.style.border = "solid red 2px";
	}
}; 



The tooltip's div.style.width is set to "auto" by default. Assign a fixed value to it to enable word wrap, or add some <p> elements to the tooltip to wrap text at specific positions.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Kiran B
Full Member
***
Offline


I Love MindFusion!

Posts: 102
Joined: Apr 19th, 2013
Re: Style for tooltips
Reply #2 - Apr 22nd, 2013 at 1:59pm
Print Post  
Thanks Stoyan. It really works
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint