Flex(gumbo)中如何通过lineThrough样式设置删除线TextGraphic的例子

By Minidxer | May 2, 2009

接下来的例子演示了Flex(gumbo)中如何通过lineThrough样式,设置删除线TextGraphic。

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


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

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplication name="TextGraphic_lineThrough_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009">
  4.     <layout>
  5.         <BasicLayout />
  6.     </layout>
  7.  
  8.     <Form>
  9.         <FormItem label="lineThrough:">
  10.             <FxCheckBox id="fxCheckBox"
  11.                     selected="true" />
  12.         </FormItem>
  13.     </Form>
  14.  
  15.     <TextGraphic id="textGraphic"
  16.             fontSize="24"
  17.             lineThrough="{fxCheckBox.selected}"
  18.             horizontalCenter="0"
  19.             verticalCenter="0">
  20.         <text>
  21.             <![CDATA[The quick brown fox jumped over the lazy dog.]]>
  22.         </text>
  23.     </TextGraphic>
  24.  
  25. </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

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

Search Posts