Flex 4中如何通过contentBackgroundColor样式设置Halo TextArea背景填充颜色的例子
By Minidxer | October 13, 2009
接下来的例子演示了Flex 4中如何通过contentBackgroundColor样式(Flex 3或者早期版本中是 backgroundColor 样式),设置Halo TextArea背景填充颜色。
下面是完整代码(或点击这里察看):
下面是main.mxml:
- <?xml version="1.0" encoding="utf-8"?>
- <s:Application name="TextArea_SparkSkin_contentBackgroundColor_test"
- xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/halo">
- <mx:ApplicationControlBar width="100%" cornerRadius="0">
- <mx:Form styleName="plain">
- <mx:FormItem label="contentBackgroundColor:">
- <mx:ColorPicker id="colorPicker"
- selectedColor="white" />
- </mx:FormItem>
- </mx:Form>
- </mx:ApplicationControlBar>
- <mx:TextArea id="textArea"
- text="The quick brown fox jumps over the lazy Doug."
- contentBackgroundColor="{colorPicker.selectedColor}"
- horizontalCenter="0"
- verticalCenter="0" />
- </s:Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Gumbo, TextArea |
No Comments » |
326 views
Tags: backgroundColor, contentBackgroundColor, Gumbo