Hi gerhard, Unfortunately, inheritance has a good side and a bad side. Just apply a seperate styleName to the child Panel, and you're done.
-TH --- In flexcoders@yahoogroups.com, "gerhard.schlager" <[EMAIL PROTECTED]> wrote: > > Hello, > > I've developed a component which extends Panel (e.g. class MyPanel) to > which I apply some styles. It works perfectly fine. However, when I > put another Panel inside MyPanel it inherits some of the styles of its > parent. That's quite annoying. I've uploaded a demo [1] which shows > the problem. When you click the button "Change style" the Panel inside > MyPanel changes its colors (headerColors) too. > > Can I somehow prevent in MyPanel that its children inherit the styles > from the parent? It would be great if the children don't get notified > about changes to styleName in MyPanel at all. If that's not possible > I'd like at least to filter out some of the style changes so that the > children of MyPanel don't inherit for example the headerColors. > > I'd be really grateful for some tips or code snippets. Thanks in advance. > > Best regards, > Gerhard > > [1] http://mjl.at/temp/demo2/ >