Is there a way to apply, say, a DropShadowFilter to the text within a TextInput component in Flex 3 without affecting the component itself?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Actually, your
mx.controls.TextInputdoes have a member calledtextFieldof type IUITextField, but it isprotected, so it can’t be accessed directly from other classes.You can view the source code for it in your Flex SDK under
/frameworks/projects/mx/src/mx/controls/TextInput.as.In order to modify this member, you can still do one of two things:
Create a class that extends
mx.controls.TextInput. Subclasses can access protected members, so you should be able to add your DropShadowFilter, probably best by overriding theupdateDisplayListmethod.Use the display list: