Flex Gumbo中如何通过textRotation样式设置TextGraphic文字旋转角度的例子

By Minidxer | May 12, 2009

接下来的例子演示了Flex Gumbo中如何通过textRotation样式,设置TextGraphic文字旋转方向。

让我们先来看一下Demo可以右键View Source或点击这里察看源代码):


下面是完整代码(或点击这里察看):

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplication name="TextGraphic_textRotation_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009">
  4.     <layout>
  5.         <BasicLayout />
  6.     </layout>
  7.  
  8.     <Declarations>
  9.         <Array id="arr">
  10.             <Object label="auto" />
  11.             <Object label="rotate0" />
  12.             <Object label="rotate90" />
  13.             <Object label="rotate180" />
  14.             <Object label="rotate270" />
  15.         </Array>
  16.     </Declarations>
  17.  
  18.     <Form>
  19.         <FormItem label="textRotation:">
  20.             <ComboBox id="comboBox"
  21.                     dataProvider="{arr}" />
  22.         </FormItem>
  23.     </Form>
  24.  
  25.     <TextGraphic id="textGraphic"
  26.             text="{Capabilities.version}"
  27.             textRotation="{comboBox.selectedItem.label}"
  28.             horizontalCenter="0"
  29.             verticalCenter="0" />
  30.  
  31. </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

Topics: Gumbo, TextGraphic | No Comments » | Tags: , ,

Search Posts