Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 创建自定义MXML组件_Apache Flex_Actionscript 3_Flash Builder - Fatal编程技术网

Apache flex 创建自定义MXML组件

Apache flex 创建自定义MXML组件,apache-flex,actionscript-3,flash-builder,Apache Flex,Actionscript 3,Flash Builder,当我在MXML组件中定义自定义属性时,我还想定义该属性的一组可能值,以使Flex Builder在调用代码完成函数时显示(自定义属性的可能值) 知道怎么做吗?使用带有枚举属性的metatag [Inspectable]元数据标记定义了有关组件属性的信息,您可以在代码提示和Flex Builder的属性检查器区域中公开该属性 您的Mxml是自定义组件的一部分,与我的一样: <com:CustomWindow width="100" height="130" frontImageSrc="{

当我在MXML组件中定义自定义属性时,我还想定义该属性的一组可能值,以使Flex Builder在调用代码完成函数时显示(自定义属性的可能值)

知道怎么做吗?

使用带有
枚举属性的metatag

[Inspectable]
元数据标记定义了有关组件属性的信息,您可以在代码提示和Flex Builder的属性检查器区域中公开该属性


您的Mxml是自定义组件的一部分,与我的一样:

 <com:CustomWindow width="100" height="130" frontImageSrc="{rp.currentItem.path}" 
   showText="{rp.currentItem.imgtext}" hideImage="{rp.currentItem.noImage}" 
   buttonMode="true" useHandCursor="true" mouseChildren="true"/>
 <com:CustomWindow width="100" height="130" frontImageSrc="{rp.currentItem.path}" 
   showText="{rp.currentItem.imgtext}" hideImage="{rp.currentItem.noImage}" 
   buttonMode="true" useHandCursor="true" mouseChildren="true"/>
//Inspectable metadata tag gives you the option in the flex builder 
//to choose an option from the available selected options
//Put it with the getter of that particular property 

[Inspectable(defaultValue="true", enumeration="true,false")]
public function get showImage():Boolean
{
       return _imgVisible;
}
public function set showImage(str:Boolean):void
{
 _imgVisible = str;
}