Hi,
I am working on an application which has a toggle button bar with
different skins assigned to individual buttons in the css file. Eg
.newBreakBtn {
        upSkin:        Embed('/img/action/xxxx.png');
}
.newCmplntBtn{
        upSkin:        Embed('/img/xxxx.png');

}

and so on. I assign the specific style to each button at run time.Eg

var btn:Button = tbtnBar.getChildAt(1) as Button;
btn.styleName = "newBreakBtn";

This works fine. The application allows the user to change the font
color and the content panel transparency , background image ,
background transparency and also allows the user save or undo these
settings after making changes.My issue is that whenever the font color
is changed along with the content panel tranparency in the following
manner, together in one event handler, the skin of the buttons is removed.

// font color
mx.styles.StyleManager.getStyleDeclaration('Application').setStyle('color',
                                        fColor.value);

// conent panel transparency
mx.styles.StyleManager.getStyleDeclaration('global').setStyle('backgroundAlpha',
                                        canvasAlphaSlider.value);

Changing them separately( in different event handlers) does not cause
any issues.
Does anybody have an idea why this is happening?

Thanks,
Peeyush 




Reply via email to