I think you misunderstand,
I am not using the Label, I am making a custom composite component.
I think if I post code it will confuse so, consider this;
I want to create a border class that creates a Label(UITextFiled), and positions the label. Now, I know I can't use RectBorder because it is not a DisplayObjectContainer, so it cannot have children. I see skin sprite is, so that is what I was using.
So I create a border and label in this border component(skin), everything works fine but, the label(UITextField) will not take on any styles. The only way to change the styles are to get a TextFormat and setTextFormat() which I don't want to do.
Maybe I should use Label but, in the docs, they say use UITextField for composite components IE Button uses one. UITextField dosn't have all baggage that I don't need in this implementaion.
Peace, Mike
On 2/2/06, Manish Jethani <[EMAIL PROTECTED]> wrote:
On 2/2/06, Teoti Graphix <[EMAIL PROTECTED]> wrote:
> Setting styleName, and even using setStyle() on the label does nothing and if you use getUITextFormat(), it returns an object like you have not set any styles.
Both work!
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
xmlns="*">
<mx:Style>
.barStyle {
color: blue;
}
</mx:Style>
<mx:Label text="foo" id="fooLabel" click="fooLabel.setStyle('color', 'red')" />
<mx:Label text="bar" id="barLabel" click="barLabel.styleName = 'barStyle'" />
</mx:Application>
Click on foo, click on bar.
Can you provide an example that doesn't work?
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

