在 Flex 中定义属性的可能值
在 Flex 中,是否可以在属性中包含某种元数据,以便能够列出属性可以使用的所有可能值? 我希望能够在从 MXML 调用属性时列出值,例如在属性 enabled 或 visible 的情况下,用户可以获得以下列表“真假”。
In Flex, is it possible to include some kind of MetaData to a property, to be able to list all possible values that a property can use? I want to be able to list the values when calling the property from MXML, as in the case of for example the property enabled or visible, where the user gets a list of "true/false".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Inspectable 元数据标记。 在您的情况下,您需要显式使用枚举属性。
Use the Inspectable metadata tag. In your case you'll want to explicitly use the enumeration attribute.