Actually, I just got what I'm looking for.  The only styles I need to
override are backgroundColor and backgroundAlpha, which are both used
in Container's createBorder() method.  I know I'm never going to want
a border/background created by Container for my component so I'm just
overriding createBorder() and not calling super.createBorder() on it.

I think that'll do!  I'd be interested in hearing if there's a better
alternative though.

Thanks!

--- In [email protected], "aaronius9er9er" <[EMAIL PROTECTED]>
wrote:
>
> Good point.  That would work, but I think I would no longer be able to
> deal with the background color using getStyle('backgroundColor') from
> my custom component (it wouldn't exist).  Essentially I'd have to set
> a backgroundColor class variable from setStyle().  Not terrible.  Any
> better ideas?
> 
> --- In [email protected], "Pan Troglodytes"
> <chimpathetic@> wrote:
> >
> > This might be kind of a hack, but you could override setStyle,
catch the
> > backgroundcolor style being set and not call the super for it.
> > 
> > On Tue, Sep 16, 2008 at 9:52 AM, aaronius9er9er <aaronius9er@>wrote:
> > 
> > >   Hi all,
> > >
> > > I'm creating a custom component which extends Container. I would
like
> > > to use the backgroundColor style to style certain parts of the
custom
> > > component. I don't have any problem getting access to the style and
> > > doing what I want with it within my component, but the parent
> > > Container class uses the style as well and paints the background of
> > > the whole component (from the very top-left to the very top-right).
> > >
> > > I there an easy way to say...hey parent, don't use the
backgroundColor
> > > style or use NaN instead of what the developer actually set?
> > >
> > > Thanks!
> > >
> > >  
> > >
> > 
> > 
> > 
> > -- 
> > Jason
> >
>


Reply via email to