在 Flex 3 中,我为 Alert 组件定义了以下样式:
Alert
{
messageStyleName: alertMessageStyle;
titleStyleName: alertTitleStyle;
buttonStyleName: alertButtonStyle;
}
.alertMessageStyle
{
borderStyle: solid;
borderAlpha: 0;
roundedBottomCorners: true;
cornerRadius: 9;
headerHeight: 20;
backgroundAlpha: 0.9;
highlightAlphas: 0, 0;
headerColors: #ffffff, #ffffff;
backgroundColor: #ffffff;
shadowDistance: 4;
shadowDirection: right;
dropShadowColor: #333333;
color: #666666;
textAlign: center;
fontFamily: Arial;
fontSize: 14;
fontWeight: bold;
}
.alertTitleStyle
{
color: #666666;
backgroundColor: #ff0000;
textAlign: center;
fontFamily: Arial;
fontSize: 13;
fontWeight: bold;
}
.alertButtonStyle
{
fontFamily: Arial;
fontSize: 12;
backgroundColor: #ff0000;
}
现在我正在迁移到 Flex 4 并且 Spark 没有 Alert 组件,所以我使用相同的样式并刚刚添加mx|Alert
,但只有消息样式有效!标题和按钮样式被忽略!有人可以解释一下如何让它们工作吗?谢谢。