我正在尝试使用带蒙皮的 TitleWindow 在 flex 4 中创建弹出窗口。 TitleWindow 包含一些表单项。但它会显示这样的警告消息“组件不支持 CSS 类型选择器:‘spark.components.FormItem’”
我的示例代码
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="400" height="600"
title="Add Employee Details"
close="addEmployeeTitleWindowClose(event)">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|FormItem
{
skinClass:ClassReference("skins.CustomFormItemSkins");
}
</fx:Style>
我也试过了..
<fx:Style source="./styles/FormItemStyles.css" />
我的CSS是
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|FormItem
{
skinClass:ClassReference("skins.CustomFormItemSkins");
}
谁能找出我的错误?
最佳答案
您的示例代码不在您的主应用程序中。
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|FormItem
{
skinClass:ClassReference("skins.CustomFormItemSkins");
}
您必须在主应用程序中添加此样式。这就是您拥有 Application 容器的地方。
我觉得应该是对的....
关于css - Flex 4 - 不支持 CSS 类型选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22373384/