flex4 SuperTabNavigator 添加关闭图片

我的SuperTabNavigator是:

<tab:SuperTabNavigator id="mySuperTabNavigatorViewMain" width="100%" height="100%" popUpButtonPolicy="off" />

 

我的样式:

<fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; @namespace flexlib "http://code.google.com/p/flexlib/"; @namespace tab "flexlib.controls.tabBarClasses.*"; tab|SuperTab{ upSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); overSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); downSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); disabledSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); selectedUpSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); selectedOverSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); selectedDownSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); selectedDisabledSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); tabCloseButtonStyleName:"SuperTabButtonStyle"; } .SuperTabButtonStyle{ icon: Embed(source="../../image/close.gif"); } </fx:Style>

 

可以正常的显示关闭图片,但是我使用另外一种方式:

<tab:SuperTabNavigator id="mySuperTabNavigatorViewMain" width="100%" height="100%" popUpButtonPolicy="off" tabStyleName="tab" />

CSS代码:

<fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; @namespace flexlib "http://code.google.com/p/flexlib/"; @namespace tab "flexlib.controls.tabBarClasses.*"; 。tab{ upSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); overSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); downSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); disabledSkin:ClassReference('ui.skins.ufmNavigatorBg2skin'); selectedUpSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); selectedOverSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); selectedDownSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); selectedDisabledSkin:ClassReference('ui.skins.ufmNavigatorBgskin'); tabCloseButtonStyleName:"SuperTabButtonStyle"; } .SuperTabButtonStyle{ icon: Embed(source="../../image/close.gif"); } </fx:Style>

图片却添加不上去,不知道是什么原因,希望知道的可以帮忙解释一下!感激不尽!

 

你可能感兴趣的:(Flex,library)