Flex中通过cornerRadius样式设置LinkButton控件边角圆滑程度的例子
By Minidxer | September 3, 2008
接下来的例子演示了Flex中如何通过cornerRadius样式,设置LinkButton控件边角圆滑程度。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application name="LinkButton_cornerRadius_test"
- xmlns:mx="http://www.adobe.com/2006/mxml"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <mx:ApplicationControlBar dock="true">
- <mx:Form styleName="plain">
- <mx:FormItem label="cornerRadius:">
- <mx:HSlider id="slider"
- minimum="0"
- maximum="10"
- value="4"
- snapInterval="1"
- tickInterval="1"
- liveDragging="false" />
- </mx:FormItem>
- </mx:Form>
- </mx:ApplicationControlBar>
- <mx:LinkButton id="linkButton"
- label="LinkButton"
- cornerRadius="{slider.value}" />
- <mx:Label text="Roll over the link button to see corner radius" />
- </mx:Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Flex |
Tags: cornerRadius, LinkButton