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

本文介绍了一个使用 Flex 实现的简单示例,通过勾选复选框来切换文本的贯穿线效果。此示例利用 TextGraphic 组件,并将 fxCheckBox 的 selected 属性绑定到 lineThrough 属性上。

main.mxml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplicationname="TextGraphic_lineThrough_test"
  3. xmlns="http://ns.adobe.com/mxml/2009">
  4. <layout>
  5. <BasicLayout/>
  6. </layout>
  7. <Form>
  8. <FormItemlabel="lineThrough:">
  9. <FxCheckBoxid="fxCheckBox"
  10. selected="true"/>
  11. </FormItem>
  12. </Form>
  13. <TextGraphicid="textGraphic"
  14. fontSize="24"
  15. lineThrough="{fxCheckBox.selected}"
  16. horizontalCenter="0"
  17. verticalCenter="0">
  18. <text>
  19. <![CDATA[The quick brown fox jumped over the lazy dog.]]>
  20. </text>
  21. </TextGraphic>
  22. </FxApplication>
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值