Thanks, Alex.

I stripped the component down to the simplest format, just putting the color number in the tooltip, and it is working correctly.  So something else I am doing is the issue.

 

I have the problem bracketed, so I’ll be able to solve this myself soon.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Alex Harui
Sent: Tuesday, September 26, 2006 7:05 PM
To: [email protected]
Subject: RE: [flexcomponents] Flex 1.5, extending Label, how/when get the color value

 

Sorry, I didn’t notice you were subclassing via MXML component.  You probably do have the right scope.

 

I don’t immediately see any problem.  Initialize should work.  If you want to post an example I can try to figure it out.

 

I’m not clear what you get out of overriding getStyle() are you sure your problem isn’t in there?  Otherwise, you shouldn’t need to call super.getStyle() and just use getStyle().

 

-Alex

 


From: [email protected] [mailto:[email protected]] On Behalf Of Tracy Spratt
Sent: Tuesday, September 26, 2006 3:50 PM
To: [email protected]
Subject: RE: [flexcomponents] Flex 1.5, extending Label, how/when get the color value

 

Yeah I’m pretty sure.  I can trace out the values of private member variables from within the handler fine. I can also trace(super.id) and see the id specified in the declaritive mxml tag.  Its an mxml component and the handlers are specified in the root Label tag, so I don’t think it is a scope problem.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Alex Harui
Sent: Tuesday, September 26, 2006 6:29 PM
To: [email protected]
Subject: RE: [flexcomponents] Flex 1.5, extending Label, how/when get the color value

 

Be careful of your scope.  Are you sure that scope of the event handler isn’t the application?

 


From: flexcomponents@yahoogroups.com [mailto:flexcomponents@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: Tuesday, September 26, 2006 3:03 PM
To: flexcomponents@yahoogroups.com
Subject: [flexcomponents] Flex 1.5, extending Label, how/when get the color value

 

I am making a simple Label subclass (mxml component) that fiddles with the text color based on certain conditions.

If those conditions are NOT met, I want to use the color that the label would have normally, after an inline color is specified or any styles have been applied.

In an initialize event handler, I call: super.getStyle("color")

But it reports the same value(16776960) regardless of any inline specified color or css style.

On creationComplete, it returns a different value(16777215), but always the same one.

How and when can I determine what the text color of the label would actually be?

Tracy

A Flex 2.0 hint would be welcome as well.

 

__._,_.___


SPONSORED LINKS
Custom software development Database development software Embedded software development
Offshore software development Software development

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to