<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Flex Butterflies and Bugs</title>
	<atom:link href="http://butterfliesandbugs.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://butterfliesandbugs.wordpress.com</link>
	<description>Flex Bugs, Solutions, and News... from a quality perspective</description>
	<lastBuildDate>Wed, 18 Jan 2012 04:11:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='butterfliesandbugs.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Flex Butterflies and Bugs</title>
		<link>http://butterfliesandbugs.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://butterfliesandbugs.wordpress.com/osd.xml" title="Flex Butterflies and Bugs" />
	<atom:link rel='hub' href='http://butterfliesandbugs.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Goodbye to Flex</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/05/26/goodbye-to-flex/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/05/26/goodbye-to-flex/#comments</comments>
		<pubDate>Thu, 26 May 2011 22:53:51 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[Flex News]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=432</guid>
		<description><![CDATA[Today is officially my last day on the Flex SDK team. I have been testing the SDK for over six years. I started on the team when Flex was just finishing up its 1.5 release. Look how far its come!  I am not leaving Adobe, however. I am simply switching roles to become a quality [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=432&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today is officially my last day on the Flex SDK team. I have been testing the SDK for over six years. I started on the team when Flex was just finishing up its 1.5 release. Look how far its come!  I am not leaving Adobe, however. I am simply switching roles to become a quality engineering manager on the Flash Player team. I thought it was time to try my hand at something a little new. I look forward to the new people and challenges.</p>
<p>I have always been a huge proponent of community feedback on the team and as my last gift to customers, I just finished sending off &#8220;Flex Community Hero&#8221; mugs to all of the customers who filed a bug and had it fixed in our last Flex 4.5 release. If you filed and SDK bug that was fixed, you probably even got a handwritten letter from our QA team. These contributions from the community are really appreciated.</p>
<p>For now, this blog will likely be pretty quiet with relation to Flex content.</p>
<p><a href="http://butterfliesandbugs.files.wordpress.com/2011/05/photo.jpg"><img class="aligncenter size-full wp-image-433" title="photo" src="http://butterfliesandbugs.files.wordpress.com/2011/05/photo-e1306450173419.jpg?w=497" alt=""   /></a></p>
<p><a href="http://butterfliesandbugs.files.wordpress.com/2011/05/photo22.jpg"><img class="aligncenter size-full wp-image-436" title="photo2" src="http://butterfliesandbugs.files.wordpress.com/2011/05/photo22.jpg?w=497" alt=""   /></a><a href="http://butterfliesandbugs.files.wordpress.com/2011/05/photo2.jpg"><br />
</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/432/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=432&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/05/26/goodbye-to-flex/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>

		<media:content url="http://butterfliesandbugs.files.wordpress.com/2011/05/photo-e1306450173419.jpg" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://butterfliesandbugs.files.wordpress.com/2011/05/photo22.jpg" medium="image">
			<media:title type="html">photo2</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting scrolling right in a mobile horizontal list</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/05/05/getting-scrolling-right-in-a-mobile-horizontal-list/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/05/05/getting-scrolling-right-in-a-mobile-horizontal-list/#comments</comments>
		<pubDate>Thu, 05 May 2011 18:39:47 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Spark Components]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=428</guid>
		<description><![CDATA[With the release of Flex 4.5, you can now use Flex to build mobile applications. One of the features added to the Spark List to support mobile was the addition of bounce/pull effects at the beginning and end of a list. You can see this behavior by pulling down on the top of a list [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=428&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With the release of Flex 4.5, you can now use Flex to build mobile applications. One of the features added to the Spark List to support mobile was the addition of bounce/pull effects at the beginning and end of a list. You can see this behavior by pulling down on the top of a list or up on the bottom of the list. When you do this, you will get a &#8216;bounce&#8217; effect from the List&#8217;s boundaries.</p>
<p>In the majority of applications, you will choose to use a vertical list. However, occasionally, you may want to use a horizontal list. If you do this, you will get some strange default behavior with regards to scrolling in your horizontal list. In the horizontal direction, scrolling will work as expected. However, in the vertical direction, where there should be no scrolling, you will actual be able to pull up and pull down on the top and bottom boundaries. This is because the bounce and pull effects are actually still on in the vertical direction. To get the expected scrolling behavior for a horizontal list, you will want to turn verticalScrollPolicy=&#8221;off&#8221; on the List.</p>
<p>&lt;s:List id=&#8221;colorList&#8221; dataProvider=&#8221;{colorsArray}&#8221; width=&#8221;100%&#8221; itemRenderer=&#8221;ColorRenderer&#8221;<br />
y=&#8221;40&#8243; selectedIndex=&#8221;0&#8243; verticalScrollPolicy=&#8221;off&#8221;&gt;<br />
&lt;s:layout&gt;<br />
&lt;s:HorizontalLayout  /&gt;<br />
&lt;/s:layout&gt;<br />
&lt;/s:List&gt;</p>
<p>For more information on this, you can check out bug: <a href="http://bugs.adobe.com/jira/browse/SDK-28980">SDK-28980</a></p>
<p>Here is an example mobile project that uses a horizontal list of colors to select a frame for an image.</p>
<p><strong><span style="color:#993366;">Source: </span></strong><a href="http://files.me.com/laffinsf/dhz3uc">ColorFun.fxp</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/428/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=428&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/05/05/getting-scrolling-right-in-a-mobile-horizontal-list/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash Camp focused on mobile development this Saturday in SF</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/04/26/flash-camp-focused-on-mobile-development-this-saturday-in-sf/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/04/26/flash-camp-focused-on-mobile-development-this-saturday-in-sf/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 20:05:29 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[Flex News]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=425</guid>
		<description><![CDATA[Flash Camp is happening in the Adobe SF office this Saturday, April 30. Sign up here. Adobe Flash Camp is a full day event with sessions and a hands-on coding session that will get you up and running and creating mobile application for Android, iOS, and PlayBook with Adobe&#8217;s tools. Details: Who: Developers who want [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=425&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Flash Camp is happening in the Adobe SF office this Saturday, April 30. Sign up <a href="http://adobeflashcampsf2011.eventbrite.com/">here</a>.</p>
<p>Adobe Flash Camp is a full day event with sessions and a hands-on coding session that will get you up and running and creating mobile application for Android, iOS, and PlayBook with Adobe&#8217;s tools.</p>
<p>Details:</p>
<p><strong>Who: </strong>Developers who want to build mobile applications for Android, iOS, and the BlackBerry PlayBook. <strong> We&#8217;re serving beer, so you must be at least 21 years old to attend!</strong></p>
<p><strong>What:</strong> Flash Camp &#8211; a morning of sessions and an afternoon of hands on coding. Flex and Flash Builder product team members will be on hands to provide answers to questions. Prizes will be given away for the best mobile applications.</p>
<p><strong>When:</strong> Saturday, April 30th, 2010. 9 AM PST &#8211; 6:00  PM PST</p>
<p><strong>Where:</strong> Adobe San Francisco Office. 601 Townsend St, San Francisco, CA 94103</p>
<p><strong>Why: </strong>Three words : code + good beer</p>
<p><strong>How Much: </strong>Free and open to the public (limited space and registration required)<strong>.</strong></p>
<p><strong>What to Bring:</strong> Yourself, laptop, ideas for a mobile application. We will provide the beer, lunch, coffee, and snacks.</p>
<p>Agenda (tentative)</p>
<p>10:00 &#8211; 10:30 &#8211; Keynote</p>
<p>10:30 &#8211; 11:00 &#8211; Building Mobile Applications: Hands on with Flash Builder and Flex 4.5</p>
<p>11:00 &#8211; 11:30 &#8211; Customer Showcase</p>
<p>11:30 &#8211; 12:00 &#8211; Break out sessions</p>
<p>- Flash Builder PHP for Mobile Devices</p>
<p>- Dot Next: Flash Builder and Flex for iOS and the PlayBook</p>
<p>- Designing for Mobile &#8211; UX/Tips/Tricks/etc for mobile devices</p>
<p>12:00 &#8211; 1:00 &#8211; Lunch</p>
<p>1:00 &#8211; 5:00 &#8211; Hands-on Code Camp</p>
<p>5:00 &#8211; 6:00 &#8211; Code-Camp Showcase and Prize Giveaway</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/425/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=425&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/04/26/flash-camp-focused-on-mobile-development-this-saturday-in-sf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>
	</item>
		<item>
		<title>Changing the barColor for an MX ProgressBar in Flex 4</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/04/22/changing-the-barcolor-for-an-mx-progressbar-in-flex-4/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/04/22/changing-the-barcolor-for-an-mx-progressbar-in-flex-4/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 16:56:34 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[ProgressBar]]></category>
		<category><![CDATA[barColor]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=419</guid>
		<description><![CDATA[In Flex 3, which uses the Halo theme, if you wanted to change the color of the bar on a ProgressBar, you would specify a &#8220;barColor&#8221; style for your ProgressBar. Unfortunately, in Flex 4, the Spark theme that is used by default does not support the barColor style. To change the color of the bar [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=419&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In Flex 3, which uses the Halo theme, if you wanted to change the color of the bar on a ProgressBar, you would specify a &#8220;barColor&#8221; style for your ProgressBar. Unfortunately, in Flex 4, the Spark theme that is used by default does not support the barColor style.</p>
<p>To change the color of the bar on a ProgressBar component, you will need to roll a custom skin. Here are the steps:</p>
<p>1. Find the ProgressBarSkin in the SDK: &lt;sdk_home&gt;/frameworks/projects/sparkskins/src/mx/skins/spark and make a copy of it.</p>
<p>2. Rename the new file as something like &#8220;CustomProgressBarSkin.mxml&#8221;.</p>
<p>3. In CustomProgressBarSkin, find the Rect that represents the fill of the bar:</p>
<pre>    &lt;!-- layer 1: fill --&gt;
    &lt;s:Rect left="2" right="2" top="2" bottom="2" &gt;
        &lt;s:fill&gt;
            &lt;s:LinearGradient rotation="90"&gt;
                &lt;s:GradientEntry color="0xFFFFFF"
                               alpha="1" /&gt;
                &lt;s:GradientEntry color="0xCC3399"
                               alpha="1" /&gt;
            &lt;/s:LinearGradient&gt;
        &lt;/s:fill&gt;
    &lt;/s:Rect&gt;</pre>
<p>4. Update the colors in your LinearGradient to your desired colors.</p>
<p>5. In your main application, add the following type selector to your application styles.</p>
<pre>        mx|ProgressBar {
            barSkin: ClassReference("CustomProgressBarSkin");
        }</pre>
<p>Note: If you want to change the appearance of the ProgressBar track, you&#8217;ll need a custom trackSkin. If you want to change the appearance of the indeterminate state of a ProgressBar, you&#8217;ll need a custom indeterminateSkin.</p>
<p><strong><span style="color:#993366;">Try the sample:</span></strong> <a href="http://files.me.com/laffinsf/7zbgfd">ProgressBarExample.swf</a></p>
<p><strong><span style="color:#993366;">Source code:</span></strong> <a href="http://files.me.com/laffinsf/91a8f6">ProgressBarExample.mxml</a>, <a href="http://files.me.com/laffinsf/8dmrkx">CustomProgressBarSkin.mxml</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/419/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=419&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/04/22/changing-the-barcolor-for-an-mx-progressbar-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding toolTips to a Spark ButtonBar</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/04/06/adding-tooltips-to-a-spark-buttonbar/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/04/06/adding-tooltips-to-a-spark-buttonbar/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 21:19:42 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[ButtonBar]]></category>
		<category><![CDATA[Spark Components]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=413</guid>
		<description><![CDATA[This question came up today as to how to add toolTips to individual Buttons in your ButtonBar. No surprise here&#8230; the solution was to create a custom skin for ButtonBar. In the custom skin, I am adding a toolTip to the firstButton,  middleButton and lastButton. I assume that people will want to display some text [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=413&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This question came up today as to how to add toolTips to individual Buttons in your ButtonBar. No surprise here&#8230; the solution was to create a custom skin for ButtonBar. In the custom skin, I am adding a toolTip to the firstButton,  middleButton and lastButton. I assume that people will want to display some text that is in their dataProvider as the toolTip. In my ButtonBar skin, everything is the same except for these component definitions of the Buttons:</p>
<pre>&lt;fx:Component id="firstButton"&gt;
    &lt;s:ButtonBarButton skinClass="spark.skins.spark.ButtonBarFirstButtonSkin"
       toolTip="{data.data}" /&gt;
&lt;/fx:Component&gt;

&lt;fx:Component id="middleButton" &gt;
    &lt;s:ButtonBarButton skinClass="spark.skins.spark.ButtonBarMiddleButtonSkin" 
        toolTip="{data.data}" /&gt;
&lt;/fx:Component&gt;

&lt;fx:Component id="lastButton" &gt;
    &lt;s:ButtonBarButton skinClass="spark.skins.spark.ButtonBarLastButtonSkin" 
         toolTip="{data.data}" /&gt;
&lt;/fx:Component&gt;</pre>
<p><strong><span style="color:#993366;">Run the Sample:</span></strong> <a href="http://files.me.com/laffinsf/h7ussk">ButtonBarExample.swf</a></p>
<p><span style="color:#993366;"><strong>Source Code:</strong></span> <a href="http://files.me.com/laffinsf/bs7lvz">ButtonBarExample.mxml</a>, <a href="http://files.me.com/laffinsf/ou0r11">ButtonBarToolTiipSkin.mxml</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/413/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=413&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/04/06/adding-tooltips-to-a-spark-buttonbar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>
	</item>
		<item>
		<title>Using a DateField itemRenderer for a Spark DataGrid</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/03/31/using-a-datefield-itemrenderer-for-a-spark-datagrid/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/03/31/using-a-datefield-itemrenderer-for-a-spark-datagrid/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 16:53:18 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[Flex Examples]]></category>
		<category><![CDATA[Spark Components]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=406</guid>
		<description><![CDATA[Here is another simple example of using a custom itemRenderer in a Spark DataGrid. In this example, I am using an MX DateField component as an inline itemRenderer. This DataGrid is also editable. Both columns &#8220;In Stock?&#8221; and &#8220;Availability Date&#8221; also have the property rendererIsEditor=&#8221;true&#8221;. This tells the DataGrid that the component specified as the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=406&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://butterfliesandbugs.files.wordpress.com/2011/03/dg_datefield.jpg"><img class="size-full wp-image-407 alignleft" title="DG_DateField" src="http://butterfliesandbugs.files.wordpress.com/2011/03/dg_datefield.jpg?w=497&#038;h=256" alt="" width="497" height="256" /></a>Here is another simple example of using a custom itemRenderer in a Spark DataGrid. In this example, I am using an MX DateField component as an inline itemRenderer.<br />
This DataGrid is also editable. Both columns &#8220;In Stock?&#8221; and &#8220;Availability Date&#8221; also have the property rendererIsEditor=&#8221;true&#8221;. This tells the DataGrid that the component specified as the itemRenderer is also the editor for this column. If you do not specify rendererIsEditor=&#8221;true&#8221;, then, updating the CheckBox or DateField will not actually affect the data. I am setting the selectedDate on the DateField via 2-way dataBinding:</p>
<pre>selectedDate="@{data.availabilityDate}"</pre>
<p>Here is the code that defines the column using the DateField itemRenderer:</p>
<pre>&lt;s:GridColumn headerText="Availability Date" dataField="availabilityDate"
     rendererIsEditable="true"&gt;
     &lt;s:itemRenderer&gt;
         &lt;fx:Component&gt;
             &lt;s:GridItemRenderer&gt;
                 &lt;mx:DateField selectedDate="@{data.availabilityDate}"
                      horizontalCenter="0" verticalCenter="0"
                      width="90%"/&gt;
             &lt;/s:GridItemRenderer&gt;
         &lt;/fx:Component&gt;
     &lt;/s:itemRenderer&gt;
 &lt;/s:GridColumn&gt;</pre>
<p><strong><span style="color:#993366;">Run the sample:</span></strong> <a href="http://files.me.com/laffinsf/bvd3es">DataGrid_DateFieldExample.swf</a></p>
<p><span style="color:#993366;"><strong>Source code: </strong></span><a href="http://files.me.com/laffinsf/5h1f1n">DataGrid_DateFieldExample.mxml</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/406/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=406&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/03/31/using-a-datefield-itemrenderer-for-a-spark-datagrid/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>

		<media:content url="http://butterfliesandbugs.files.wordpress.com/2011/03/dg_datefield.jpg" medium="image">
			<media:title type="html">DG_DateField</media:title>
		</media:content>
	</item>
		<item>
		<title>Using a Spark Form with Validators</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/03/29/using-a-spark-form-with-validators/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/03/29/using-a-spark-form-with-validators/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 21:38:14 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[Spark Components]]></category>
		<category><![CDATA[Validators]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=402</guid>
		<description><![CDATA[In this example, I&#8217;ve created a very simple registration form using Flex 4.5&#8242;s Form component. To validate the form, I am using MX StringValidator and MX EmailValidator. There are no Spark validators available for the fields I have in my form. Validation does not get triggered in this example until you click on the &#8216;Submit&#8217; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=402&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://butterfliesandbugs.files.wordpress.com/2011/03/validatorform.gif"><img class="aligncenter size-full wp-image-403" title="validatorForm" src="http://butterfliesandbugs.files.wordpress.com/2011/03/validatorform.gif?w=497" alt=""   /></a></p>
<p>In this example, I&#8217;ve created a very simple registration form using Flex 4.5&#8242;s Form component. To validate the form, I am using MX StringValidator and MX EmailValidator. There are no Spark validators available for the fields I have in my form. Validation does not get triggered in this example until you click on the &#8216;Submit&#8217; button.</p>
<p>By default, the FormItem skin puts the error message to the right of your Form Item. However, this was causing the width of my Form to double. I didn&#8217;t want the size of my Form to change significantly, so, I reskinned my FormItem to remove the &#8220;indicatorDisplay&#8221; and &#8220;errorTextDisplay&#8221;. Instead, I&#8217;ve chosen to show the validation errors for all three fields in a separate Label component that sits at the top of this Form.</p>
<p>In my Style block, I point to this custom FormItem skin:</p>
<p>&lt;fx:Style&gt;<br />
@namespace s &#8220;library://ns.adobe.com/flex/spark&#8221;;<br />
@namespace mx &#8220;library://ns.adobe.com/flex/mx&#8221;;</p>
<p>s|FormItem {<br />
skinClass: ClassReference(&#8220;FormValidatorItemSkin&#8221;)<br />
}<br />
&lt;/fx:Style&gt;</p>
<p><strong><span style="color:#993366;">Sample SWF:</span></strong><a href="http://files.me.com/laffinsf/n2hmzw"> SparkFormValidatorExample.swf</a><br />
<strong><span style="color:#993366;">Sample Code:</span></strong> <a href="http://files.me.com/laffinsf/5y61rf">SparkFormValidatorExample.mxml</a>, <a href="http://files.me.com/laffinsf/xwijoj">FormValidatorItemSkin.mxml</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/402/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=402&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/03/29/using-a-spark-form-with-validators/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>

		<media:content url="http://butterfliesandbugs.files.wordpress.com/2011/03/validatorform.gif" medium="image">
			<media:title type="html">validatorForm</media:title>
		</media:content>
	</item>
		<item>
		<title>Where is drag and drop in the Spark DataGrid?</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/03/10/where-is-drag-and-drop-in-the-spark-datagrid/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/03/10/where-is-drag-and-drop-in-the-spark-datagrid/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 17:04:44 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[DragManager]]></category>
		<category><![CDATA[Spark Components]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=399</guid>
		<description><![CDATA[Before you spend any significant amount of time trying to figure out what APIs are available for enabling drag and drop on the Spark DataGrid, I thought I&#8217;d put it out there that it will not be available in the first Hero release of the component.  In flash builder, I think you will get code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=399&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before you spend any significant amount of time trying to figure out what APIs are available for enabling drag and drop on the Spark DataGrid, I thought I&#8217;d put it out there that it will not be available in the first Hero release of the component.  In flash builder, I think you will get code hints for events like dragComplete, dragStart, dragEnter, dragOver, however, you won&#8217;t find the properties dragEnabled or dropEnabled.</p>
<p>I believe that the team plans to add drag and drop support in the next big release after Hero, but, features haven&#8217;t been set in stone and I certainly can&#8217;t promise anything.</p>
<p>For now, if you really need drag and drop in a Spark DataGrid, you are left writing your own. Sorry <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   I was disappointed to hear the news too.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/399/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/399/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/399/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/399/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/399/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/399/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/399/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/399/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/399/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/399/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/399/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/399/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/399/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/399/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=399&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/03/10/where-is-drag-and-drop-in-the-spark-datagrid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>
	</item>
		<item>
		<title>It&#8217;s a best practice to size a Spark DataGrid&#8217;s columns with a typicalItem</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-datagrids-columns-with-a-typicalitem/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-datagrids-columns-with-a-typicalitem/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 21:35:49 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[Spark Components]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=396</guid>
		<description><![CDATA[Coming from Flex 3, if I wanted to set the size of my DataGrid columns to ensure that all of my data was displayed correctly, I would either set column widths with explicit values or percentages. In Flex 4, explicit width columns is no longer the recommended way of figuring out the size of columns [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=396&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Coming from Flex 3, if I wanted to set the size of my DataGrid columns to ensure that all of my data was displayed correctly, I would either set column widths with explicit values or percentages. In Flex 4, explicit width columns is no longer the recommended way of figuring out the size of columns according to Spark DataGrid&#8217;s architect Hans Muller who schooled me when I mentioned the need to fix a bug that involved explicit width columns.</p>
<p>By default, a DataGrid will use the first item in its dataProvider to determine the size of each column. This may not be what you want. If you specify a typicalItem on the DataGrid, the columns will be large enough to fit this item. This item does not need to be a part of your dataProvider.</p>
<p>Specifying explicit column widths can be problematic because the width can be invalidated by  a host of factors: implicit renderer changes, e.g. due to inherited styles, explicit renderer changes, margin/padding and other layout configuration changes, as well as text and text format localizations.  For all of these reasons, using the typicalItem is better.</p>
<p>In the following example, I have two DataGrids with the same data and columns. The first one specifies a typicalItem where the data includes the longest strings that I want to display in my columns. The second DataGrid uses no typicalItem and therefore sizes its columns using the first item of the dataProvider.</p>
<p><strong><span style="color:#993366;">Sample application</span></strong>: <a href="http://files.me.com/laffinsf/nml4s1">TypicalItem_DataGrid_Example.swf</a></p>
<p><span style="color:#993366;"><strong>Sample MXML:</strong></span> <a href="http://files.me.com/laffinsf/uuygc2">TypicalItem_DataGrid_Example.mxml</a></p>
<p>If you change your typicalItem, you will need to call invalidateTypicalItem() notifying the DataGrid of this change.</p>
<p>Note, almost all of this information was compiled from picking the brain of Hans Muller, I hope I&#8217;ve accurately represented his thinking.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/396/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=396&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-datagrids-columns-with-a-typicalitem/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding an icon to the header for a Spark DataGrid</title>
		<link>http://butterfliesandbugs.wordpress.com/2011/02/16/adding-an-icon-to-the-header-for-a-spark-datagrid/</link>
		<comments>http://butterfliesandbugs.wordpress.com/2011/02/16/adding-an-icon-to-the-header-for-a-spark-datagrid/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 20:05:36 +0000</pubDate>
		<dc:creator>jlafferty</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[Gumbo Samples]]></category>
		<category><![CDATA[Spark Components]]></category>

		<guid isPermaLink="false">http://butterfliesandbugs.wordpress.com/?p=391</guid>
		<description><![CDATA[Adding a static icon to the header of Spark DataGrid is very easy. You will need to create a custom  headerRenderer and specify it for your GridColumn. Here are the steps: 1. Copy the contents of the skin file: DefaultGridHeaderRenderer.mxml and paste it into a new mxml f ile that will be used as your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=391&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://butterfliesandbugs.files.wordpress.com/2011/02/headerwithicon.jpg"><img class="aligncenter size-full wp-image-392" title="headerWithIcon" src="http://butterfliesandbugs.files.wordpress.com/2011/02/headerwithicon.jpg?w=497&#038;h=170" alt="" width="497" height="170" /></a></p>
<p>Adding a static icon to the header of Spark DataGrid is very easy. You will need to create a custom  headerRenderer and specify it for your GridColumn. Here are the steps:</p>
<p>1. Copy the contents of the skin file: DefaultGridHeaderRenderer.mxml and paste it into a new mxml f ile that will be used as your custom headerRenderer.</p>
<p>2. In the custom header renderer, find the HGroup at the end of the skin file. Add a BitmapImage as the first element in the HGroup (before the &#8216;labelDisplay&#8217; Group).</p>
<pre>&lt;s:BitmapImage source="beer.JPG" /&gt;</pre>
<p>3. You might want to make some padding or gap changes to the HGroup to position your icon. This example changed the gap to 8.</p>
<p>4. Specify this custom headerRenderer for your GridColumn:</p>
<pre>&lt;s:GridColumn id="c1_2" dataField="name" headerText="Pub Name"
    headerRenderer="IconHeaderRenderer2"/&gt;</pre>
<p>Voila! It&#8217;s simple. Note, if you wanted to modify the sortIndicator, you can also do it by creating a custom header renderer based off of the default one.</p>
<p><strong><span style="color:#993366;">Sample Code:</span></strong> <a href="http://files.me.com/laffinsf/orm6lh">IconHeaderExample.mxml</a>, <a href="http://files.me.com/laffinsf/7ocyth">IconHeaderRenderer.mxml</a> <a href="http://files.me.com/laffinsf/5ghs6q">IconHeaderRenderer2.mxml</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/butterfliesandbugs.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/butterfliesandbugs.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/butterfliesandbugs.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/butterfliesandbugs.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/butterfliesandbugs.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/butterfliesandbugs.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/butterfliesandbugs.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/butterfliesandbugs.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/butterfliesandbugs.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/butterfliesandbugs.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/butterfliesandbugs.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/butterfliesandbugs.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/butterfliesandbugs.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/butterfliesandbugs.wordpress.com/391/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=butterfliesandbugs.wordpress.com&amp;blog=1205735&amp;post=391&amp;subd=butterfliesandbugs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://butterfliesandbugs.wordpress.com/2011/02/16/adding-an-icon-to-the-header-for-a-spark-datagrid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/865cb8e935b154f5e8e1152816c5a3b7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jlafferty</media:title>
		</media:content>

		<media:content url="http://butterfliesandbugs.files.wordpress.com/2011/02/headerwithicon.jpg" medium="image">
			<media:title type="html">headerWithIcon</media:title>
		</media:content>
	</item>
	</channel>
</rss>
