Solved! Go to Solution.
<s:HGroup id="mapLayersContainer" gap="9">
<s:Button id="opLayerListButton"
label="{opLayerListButtonLabel}"
rollOut="startHideTimer()"
rollOver="opLayerListButton_rollOverHandler(event)"
visible="false"/>
<s:ButtonBar id="basemapButtonBar"
change="basemapButtonBar_changeHandler(event)"
dataProvider="{basemapList}"
excludeFrom="noBasemaps"
labelField="label"
requireSelection="true"/>
</s:HGroup>
<s:BorderContainer id="opLayersContainer"
width="265" height="180"
click="opLayersContainer_clickHandler(event)"
creationComplete="opLayersContainer_creationCompleteHandler(event)"
includeInLayout="false"
rollOut="startHideTimer()"
rollOver="hideTimer.reset()"
visible="false"
backgroundColor="{getStyle('headerBackgroundColor')}"
>
<toc:TOC id="toc"
left="2" right="2" top="3" bottom="3"/>
</s:BorderContainer>
opLayersContainer.setStyle("backgroundColor", getStyle("contentBackgroundColor")); so you need to change it there.
<s:HGroup id="mapLayersContainer" gap="9" rollOver="{rollOverFade.play()}" rollOut="{rollOutFade.play()}"> <s:Button id="opLayerListButton" styleName="HeaderStyle" label="{opLayerListButtonLabel}" rollOut="startHideTimer()" rollOver="opLayerListButton_rollOverHandler(event)" visible="false"/> <s:ButtonBar id="basemapButtonBar" styleName="HeaderStyle" change="basemapButtonBar_changeHandler(event)" dataProvider="{basemapList}" excludeFrom="noBasemaps" labelField="label" requireSelection="true"/> </s:HGroup> <s:BorderContainer id="opLayersContainer" styleName="HeaderStyle" width="265" height="180" click="opLayersContainer_clickHandler(event)" creationComplete="opLayersContainer_creationCompleteHandler(event)" includeInLayout="false" rollOut="startHideTimer()" rollOver="hideTimer.reset()" visible="false"> <toc:TOC id="toc" left="2" right="2" top="3" bottom="3"/> </s:BorderContainer> protected function opLayersContainer_creationCompleteHandler(event:FlexEvent):void { //opLayersContainer.setStyle("backgroundColor", getStyle("contentBackgroundColor")); //opLayersContainer.setStyle("skinClass", FlexGlobals.topLevelApplication.getStyle("skinClass")); } //My Code Start var cssStyleDeclarationHeaderStyle:CSSStyleDeclaration = topLevelStyleManager.getStyleDeclaration(".HeaderStyle"); if (numberOfStyleColors > 4) { cssStyleDeclarationHeaderStyle.setStyle("backgroundColor", headerBackGroundColor); cssStyleDeclarationHeaderStyle.setStyle("chromeColor", headerBackGroundColor); } topLevelStyleManager.setStyleDeclaration(".HeaderStyle", cssStyleDeclarationHeaderStyle, false); // My Code End