Jason:

That works great. Thanks for the info.

That still leaves one question, 

Is there a way of telling if the textAlign attribute is at its 
default (left) state or was it set in the mxml (or programmatically) 
to "left"?

What I am trying to do is override default behavior in my extended 
TextInput, but if someone actually specifies textAlign="left" I 
don't want to override that.

Paul

--- In [email protected], "jmfillman" <[EMAIL PROTECTED]> wrote:
>
> Paul,
> 
> I believe that the answer to your original question is that you 
need 
> to use setStyle().
> 
> For example:
> 
> <mx:TextInput id="myTextInput"/>
> 
> private function textAlign():void{
>      myTextInput.setStyle("textAlign", "center");
> }
> 
> Jason
> --- In [email protected], "aceoohay" <pauls@> wrote:
> >
> > Well I found the answer, but I have another question or two.
> > 
> > The answer is this.nonInheritingStyles.textAlign.
> > 
> > One new question is how can I tell whether this value is the 
> default 
> > value, or a value set by the mxml?
> > 
> > If I change the value during run time, it doesn't seem to honor 
the 
> > new value. How can I go about making this happen?
> > 
> > Paul
> > 
> > --- In [email protected], "aceoohay" <pauls@> wrote:
> > >
> > > I am trying to extend the TextInput class and one thing I 
would 
> > like 
> > > to do is check the current value of the textAlign attribute, 
and 
> > > change it if needed.
> > > 
> > > I access the other attributes that I need using the syntax 
> > > this.attributeName such as this.maxChars, I cannot, however 
> access 
> > > this.textAlign. The compiler barfs with error 1119 Access of 
> > possibly 
> > > undefined property...
> > > 
> > > It also doesn't appear in the intellisense for the "this" 
keyword 
> > in 
> > > my extended class. It does appear in the intellisense for the 
> > > <mx:TextInput> tag.
> > > 
> > > Any ideas?
> > > 
> > > Paul
> > >
> >
>


Reply via email to