<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>中文Flex例子 &#187; Button</title>
	<atom:link href="http://blog.minidx.com/tag/button/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.minidx.com</link>
	<description>中文Adobe Flex例子,Flex实例教程,RIA资源,全文检索技术,算法和数据结构</description>
	<lastBuildDate>Thu, 31 Mar 2011 03:22:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flex中如何通过icon样式从SWF中指定一个Button的例子</title>
		<link>http://blog.minidx.com/2009/04/25/2389.html</link>
		<comments>http://blog.minidx.com/2009/04/25/2389.html#comments</comments>
		<pubDate>Sat, 25 Apr 2009 13:38:41 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Button]]></category>
		<category><![CDATA[Embed]]></category>
		<category><![CDATA[icon]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=2389</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过icon样式从SWF中指定一个Button。
让我们先来看一下Demo（可以右键View Source或点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;horizontal&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Button&#160;label=&#34;Bullet Add&#34;
&#160; &#160; &#160; &#160; &#160; &#160; icon=&#34;@Embed(source='icons.swf', symbol='bullet_add')&#34;&#160;/&#62;
&#160; &#160; &#60;mx:Button&#160;label=&#34;Bullet Delete&#34;
&#160; &#160; &#160; &#160; &#160; &#160; icon=&#34;@Embed(source='icons.swf', symbol='bullet_delete')&#34;&#160;/&#62;
&#160; &#160; &#60;mx:Button&#160;label=&#34;Bullet Star&#34;
&#160; &#160; &#160; &#160; &#160; &#160; icon=&#34;@Embed(source='icons.swf', symbol='bullet_star')&#34;&#160;/&#62;
&#160;
&#60;/mx:Application&#62;
代码：Peter deHaan 翻译/整理/编译：中文Flex例子

你可能还对下列文章感兴趣:Flex中如何利用Style Sheet和&#60;mx:style&#62;标签嵌入图片/图标的例子Flex中给按钮设置icon图标的例子Flex中如何通过disabledIcon样式和enabled属性在Button在改变有效/无效状态时改变图标的例子Flex中通过按钮类的textAlign样式和labelPlacement属性控制按钮(Button)标签位置的例子Flex中如何在Panel容器中增加图标(icons)的例子]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/04/25/2389.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过paddingLeft, paddingRight, paddingTop, paddingBottom和horizontalGap样式调整Button的标签和图标的各填充距离的例子</title>
		<link>http://blog.minidx.com/2009/01/25/2013.html</link>
		<comments>http://blog.minidx.com/2009/01/25/2013.html#comments</comments>
		<pubDate>Sun, 25 Jan 2009 03:42:04 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Button]]></category>
		<category><![CDATA[horizontalGap]]></category>
		<category><![CDATA[paddingBottom]]></category>
		<category><![CDATA[paddingLeft]]></category>
		<category><![CDATA[paddingRight]]></category>
		<category><![CDATA[paddingTop]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=2013</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过paddingLeft, paddingRight, paddingTop, paddingBottom和horizontalGap样式，调整Button的标签和图标的各填充距离。
让我们先来看一下Demo（可以右键View Source或点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;
&#160; &#160; &#160; &#160; creationComplete=&#34;init();&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Style&#62;
&#160; &#160; &#160; &#160; HSlider {
&#160; &#160; &#160; &#160; &#160; &#160; labelOffset: 0;
&#160; &#160; &#160; &#160; &#160; &#160; dataTipPlacement: right;
&#160; &#160; &#160; &#160; }
&#160;
&#160; &#160; &#160; &#160; .iconButton {
&#160; &#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/01/25/2013.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过fillColors和fillAlphas样式改变Button的填充透明度以及背景填充颜色的例子</title>
		<link>http://blog.minidx.com/2009/01/25/2010.html</link>
		<comments>http://blog.minidx.com/2009/01/25/2010.html#comments</comments>
		<pubDate>Sun, 25 Jan 2009 03:38:16 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Button]]></category>
		<category><![CDATA[fillAlphas]]></category>
		<category><![CDATA[fillColors]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=2010</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过fillColors和fillAlphas样式，改变Button的填充透明度以及背景填充颜色。
让我们先来看一下Demo（可以右键View Source或点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Button&#160;id=&#34;button2&#34;
&#160; &#160; &#160; &#160; &#160; &#160; label=&#34;2 fill colors defined&#34;
&#160; &#160; &#160; &#160; &#160; &#160; fillColors=&#34;[red, haloOrange]&#34;&#160;/&#62;
&#160;
&#160; &#160; &#60;mx:Button&#160;id=&#34;button4&#34;
&#160; &#160; &#160; &#160; &#160; &#160; label=&#34;4 fill colors defined&#34;
&#160; &#160; &#160; &#160; &#160; &#160; fillColors=&#34;[red, haloOrange, haloGreen, haloBlue]&#34;&#160;/&#62;
&#160;
&#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/01/25/2010.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过doubleClickEnabled属性监听按钮(Button)doubleClick的例子</title>
		<link>http://blog.minidx.com/2009/01/01/1859.html</link>
		<comments>http://blog.minidx.com/2009/01/01/1859.html#comments</comments>
		<pubDate>Thu, 01 Jan 2009 12:10:24 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Button]]></category>
		<category><![CDATA[click]]></category>
		<category><![CDATA[doubleClick]]></category>
		<category><![CDATA[doubleClickEnabled]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=1859</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过doubleClickEnabled属性，监听按钮(Button)doubleClick。
让我们先来看一下Demo（可以右键View Source或点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Script&#62;
&#160; &#160; &#160; &#160; &#60;![CDATA[
&#160; &#160; &#160; &#160; &#160; &#160; private function button_click(evt:MouseEvent):void {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; appendText(evt.type);
&#160; &#160; &#160; &#160; &#160; &#160; }
&#160;
&#160; &#160; &#160; &#160; &#160; &#160; private function button_doubleClick(evt:MouseEvent):void {
&#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/01/01/1859.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过disabledIcon样式和enabled属性在Button在改变有效/无效状态时改变图标的例子</title>
		<link>http://blog.minidx.com/2008/11/06/1608.html</link>
		<comments>http://blog.minidx.com/2008/11/06/1608.html#comments</comments>
		<pubDate>Thu, 06 Nov 2008 11:54:36 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Button]]></category>
		<category><![CDATA[disabledIcon]]></category>
		<category><![CDATA[icon]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=1608</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过disabledIcon样式和enabled属性，在Button在改变有效/无效状态时改变图标。
让我们先来看一下Demo（可以右键View Source或点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Style&#62;
&#160; &#160; &#160; &#160; .addButton {
&#160; &#160; &#160; &#160; &#160; &#160; icon: Embed(source=&#34;images/bullet_add.png&#34;);
&#160; &#160; &#160; &#160; &#160; &#160; disabledIcon: Embed(source=&#34;images/bullet_delete.png&#34;);
&#160; &#160; &#160; &#160; }
&#160; &#160; &#60;/mx:Style&#62;
&#160;
&#160; &#160; &#60;mx:ApplicationControlBar&#160;dock=&#34;true&#34;&#62;
&#160; &#160; &#160; &#160; &#60;mx:CheckBox&#160;id=&#34;checkBox&#34;
&#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2008/11/06/1608.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 2/32 queries in 0.291 seconds using disk
Object Caching 407/805 objects using disk

Served from: blog.minidx.com @ 2012-02-09 11:16:34 -->
