6/27/2010 9:43:50 AM
Title:
How to set the htmlString as panel title
I need to give a html text as a panel title, how to achieve this ?i am using the folowing method
override mx_internal function createTitleTextField(childIndex:int):void
{
// Create the titleTextField as a child of the titleBar.
super.createTitleTextField(childIndex);
titleTextField.htmlText = title;
}
}
but its not taking the html text.
6/27/2010 10:44:59 AM
you can extend the Panel class and override the createChildren method to add a new text box for HTML title , also declare a setter function to set the property
protected override function createChildren(): void {
super.createChildren();
var mytext:TextField= new TextField();
//position the text box
mytext.x= 10;
mytext.y= 5;
}
// setter method to set title
public function htmlTitle(str:String):void{
mytext.htmlText=str;
}
I have written code in notepad so there can be some syntax problem . but the logic is fine .