Thanks for your quick reply... Both of those suggestions work. The problem I have is that it is actually some child components of the AnswerButtonPanel that I want to be able to style. In order to do this with the class name identifier in CSS I would have to hard code the styleName when I create the child controls and then always use that in the stylesheet as I don't explicitly create the children in MXML (they are created by the AnswerButtonPanel) and so can't specify it there.
I was hoping, and it appears that you can in the docs, to be able to just set a style for all 'AnswerButton' components (the children of the AnswerButtonPanel) and it be picked up.
As it stands, neither the AnswerButtonPanel or AnswerButton are picking up the style info if I use the format in my original post.
Thanks again for your help...
Graham
Blog
--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> Hi Graham,
>
> Have you tried this:
>
> AnswerButtonPanel.setStyle('headingFontColor', '#FF0000');
>
> Or use a CSS file:
>
> CSS:
>
> myStyle {
> headingFontColor:#FF0000;
> }
>
> MXML:
>
> <uiComponents: AnswerButtonPanel styleName="myStyle"/>
>
> -TH
>
> --- In [email protected], "grahampengelly" <graham@>
> wrote:
> >
> > Hi
> >
> > I have created a custom component that derives from Box. I have
> added a
> > couple of style decarations within the code for the component. The
> > following is an example:
> >
> > [Style(name="headingFontColor", type="uint", format="Color",
> > inherit="no")]
> >
> > ...and then I access this using getStyle("headingFontColor"),
> well, I
> > wrap that with a default value function but that is the cut of it.
> >
> > So it works if I set the style within the component tag in the
> MXML like
> > this:
> >
> > <uiComponents: AnswerButtonPanel headingFontColor="0xFF0000" />
> >
> > but if I try to set it as such:
> >
> > <mx:Style>
> > AnswerButtonPanel
> > {
> > headingFontColor:#FF0000;
> > <!-- I have also tried "#FF0000", 0xFF0000 and "0xFF0000"
> here,
> > as per some examples that I have found, but none work -->
> > }
> > </mx:Style>
> >
> > it doesn't get set. Do I have to do something to get this
> functionality?
> >
> > Thanks for your help in advance.
> >
> > Graham
> >
> __._,_.___
--
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
| Software development tool | Software development | Software development services |
| Home design software | Software development company |
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.
__,_._,___

