Flex Gumbo中如何通过textRotation样式设置TextGraphic文字旋转角度的例子
By Minidxer | May 12, 2009
接下来的例子演示了Flex Gumbo中如何通过textRotation样式,设置TextGraphic文字旋转方向。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <FxApplication name="TextGraphic_textRotation_test"
- xmlns="http://ns.adobe.com/mxml/2009">
- <layout>
- <BasicLayout />
- </layout>
- <Declarations>
- <Array id="arr">
- <Object label="auto" />
- <Object label="rotate0" />
- <Object label="rotate90" />
- <Object label="rotate180" />
- <Object label="rotate270" />
- </Array>
- </Declarations>
- <Form>
- <FormItem label="textRotation:">
- <ComboBox id="comboBox"
- dataProvider="{arr}" />
- </FormItem>
- </Form>
- <TextGraphic id="textGraphic"
- text="{Capabilities.version}"
- textRotation="{comboBox.selectedItem.label}"
- horizontalCenter="0"
- verticalCenter="0" />
- </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Gumbo, TextGraphic |
No Comments » |
Tags: Gumbo, TextGraphic, textRotation