Flex中如何改变FormItem容器的指示器(indicator)皮肤的例子
By Minidxer | October 14, 2008
接下来的例子演示了Flex中如何改变FormItem容器的指示器(indicator)皮肤。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
- layout="vertical"
- verticalAlign="top"
- backgroundColor="white">
- <mx:Style>
- FormItem {
- indicatorSkin: Embed(source="assets/asterisk_yellow.png");
- indicatorGap: 24; /* pixels */
- }
- FormItemLabel {
- textAlign: left;
- }
- </mx:Style>
- <mx:Form>
- <mx:FormHeading label="FORM HEADING" />
- <mx:FormItem label="Name:" required="true">
- <mx:TextInput />
- </mx:FormItem>
- <mx:FormItem label="Email:" required="true">
- <mx:TextInput />
- </mx:FormItem>
- <mx:FormItem label="Phone number:">
- <mx:TextInput />
- </mx:FormItem>
- </mx:Form>
- </mx:Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
FormItem |
No Comments » |
625 views
Tags: Form, FormHeading, FormItem, indicatorGap, indicatorSkin