Flex Gumbo中如何通过breakOpportunity样式给FxTextArea内容中添加Break的例子
By Minidxer | June 1, 2009
接下来的例子演示了Flex Gumbo中如何通过breakOpportunity样式,给FxTextArea内容中添加Break。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <Application name="FxTextArea_breakOpportunity_test"
- xmlns="http://ns.adobe.com/mxml/2009"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <Script>
- import flash.text.engine.BreakOpportunity;
- </Script>
- <ApplicationControlBar dock="true">
- <Form styleName="plain">
- <FormItem label="breakOpportunity:">
- <ComboBox id="comboBox" selectedIndex="2">
- <dataProvider>
- <Array>
- <String>{BreakOpportunity.ALL}</String>
- <String>{BreakOpportunity.ANY}</String>
- <String>{BreakOpportunity.AUTO}</String>
- <String>{BreakOpportunity.NONE}</String>
- </Array>
- </dataProvider>
- </ComboBox>
- </FormItem>
- </Form>
- </ApplicationControlBar>
- <FxTextArea id="textArea"
- breakOpportunity="{comboBox.selectedItem}"
- width="400"
- height="300">
- <content><String source="data/lorem.html" /></content>
- </FxTextArea>
- </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
FxTextArea, Gumbo |
2 Comments » |
Tags: breakOpportunity, FxTextArea, Gumbo
flash挂了?
貌似编译出来的东西有问题,回头重新编译一个