Hi Tim

Thanks for taking the time to get back to me. The two suggestions that
you gave both work. The problem that I have is that I also need to
style child components of the AnswerButtonPanel that are dynamically
created. If I use the styleName approach I would have to hard code a
styleName and then always use that.

What I was hoping, and looking at the examples it should work, was
that I could set a style for all AnswerButton components (the children
that are created) using the syntax that I gave in my original post. I
just can't work out why it doesn't work when every other method of
setting the style info works fine.

Thanks again...

Graham

--- 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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to