Interactive Development specialising in web-applications
Setting Styles on UITextField Revisited
In a previous post I highlighted how I found that certain styles where getting lost on my UITextField’s especially in renderers etc. I still noted people were finding this a continued issue and I have found a better way of handling this now which I have so far had 100% success with. Please see the code below:
12
var customTxtField: CustomUITextField = new CustomUITextField();
customTxtField.styleName = "styleCustomText";
123456789
//Add this into a Custom Class that extends UITextField
override public function styleChanged( styleProp:String ):void
{
super.styleChanged( styleProp );
var c:Number = getStyle("textColor");
setColor( c );
}