Flex中通过cornerRadius样式设置LinkButton控件边角圆滑程度的例子

By Minidxer | September 3, 2008

接下来的例子演示了Flex中如何通过cornerRadius样式,设置LinkButton控件边角圆滑程度。

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


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

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application name="LinkButton_cornerRadius_test"
  3.         xmlns:mx="http://www.adobe.com/2006/mxml"
  4.         layout="vertical"
  5.         verticalAlign="middle"
  6.         backgroundColor="white">
  7.  
  8.     <mx:ApplicationControlBar dock="true">
  9.         <mx:Form styleName="plain">
  10.             <mx:FormItem label="cornerRadius:">
  11.                 <mx:HSlider id="slider"
  12.                         minimum="0"
  13.                         maximum="10"
  14.                         value="4"
  15.                         snapInterval="1"
  16.                         tickInterval="1"
  17.                         liveDragging="false" />
  18.             </mx:FormItem>
  19.         </mx:Form>
  20.     </mx:ApplicationControlBar>
  21.  
  22.     <mx:LinkButton id="linkButton"
  23.             label="LinkButton"
  24.             cornerRadius="{slider.value}" />
  25.  
  26.     <mx:Label text="Roll over the link button to see corner radius" />
  27.  
  28. </mx:Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

Topics: Flex | Tags: ,

Related Post

Leave a Comment

Name(*):

E-Mail(*) :

Website :

Comments :

Search Posts

Archives

Sponsored Ads