用户登录
用户注册

分享至

flex默认

  • 作者: 浪荡子17752709
  • 来源: 51数据库
  • 2020-10-01
这要看你是什么自定义组件了,一种是对于原有组件的扩展,还有一种是完全自定义一个新的组件。 如果是第二种那么在自定义的组件中可以定义数组对象。新定义的组件有两种方式:一种是mxml的方式,一种是as的方式。 如果是mxml的方式那么在页面中加



  private var _type:string="readonly" ; //单选、多选、只读,其中只读是默认属性
[inspectable(defaultvalue="anychar",enumeration="readonly,oneselect,multiselect",type="string")]
public function get type():string
{
return _type;
}

public function set type(value:string):void
{
_type = value;
}

这样你定义的组件的type属性就有3个默认值了!
软件
前端设计
程序设计
Java相关