To enhance the normal tool tip functionality to have html style break/ font weight for a portion of string:
You need to create a action class like this:
package com.philip
{
import mx.containers.*;
import mx.controls.Text;
import mx.controls.ToolTip;
import mx.core.*;
public class HTMLToolTip extends ToolTip
{
public function HTMLToolTip()
{ super(); }
override protected function commitProperties():void{
super.commitProperties();
textField.htmlText = text;
}
}
}
to use this set this in your main component, call this function on creationComplete:
<![CDATA[
import com.*;
private function init():void{
ToolTipManager.toolTipClass = HTMLToolTip;
myBtn.toolTip = "this is HTMLToolTip."
]]>
The original post has strong tag but that didn’t work for me in Flex 3.5 SDK worked fine
Link to the original post
You need to create a action class like this:
package com.philip
{
import mx.containers.*;
import mx.controls.Text;
import mx.controls.ToolTip;
import mx.core.*;
public class HTMLToolTip extends ToolTip
{
public function HTMLToolTip()
{ super(); }
override protected function commitProperties():void{
super.commitProperties();
textField.htmlText = text;
}
}
}
to use this set this in your main component, call this function on creationComplete:
<![CDATA[
import com.*;
private function init():void{
ToolTipManager.toolTipClass = HTMLToolTip;
myBtn.toolTip = "this is HTMLToolTip."
]]>
The original post has strong tag but that didn’t work for me in Flex 3.5 SDK worked fine
Link to the original post
No comments:
Post a Comment