<?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>Doug Diego &#187; Flex</title>
	<atom:link href="http://dougdiego.com/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougdiego.com</link>
	<description></description>
	<lastBuildDate>Sat, 10 Apr 2010 14:16:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adobe Flex ComboBox Cell Padding</title>
		<link>http://dougdiego.com/2008/11/02/adobe-flex-combobox-cell-padding/</link>
		<comments>http://dougdiego.com/2008/11/02/adobe-flex-combobox-cell-padding/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 02:06:56 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=98</guid>
		<description><![CDATA[Recently I was trying to figure out how to make the padding in the cells of a &#60;mx:comboBox&#62; smaller than the default.  This proved to be much harder than I thought.  But I eventually found a solution.
Here is what the default looks like:

Here is the code I came up with:


&#60;mx:Script xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;&#62;
&#60;![CDATA[
import mx.controls.Alert;
import mx.core.Application;
import [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was trying to figure out how to make the padding in the cells of a &lt;mx:comboBox&gt; smaller than the default.  This proved to be much harder than I thought.  But I eventually found a solution.</p>
<p>Here is what the default looks like:<br />
<a href="http://dougdiego.com/wp-content/uploads/2008/10/standard.png"><img class="alignnone size-medium wp-image-99" title="Default Padding" src="http://dougdiego.com/wp-content/uploads/2008/10/standard.png" alt="" width="136" height="205" /></a></p>
<p>Here is the code I came up with:</p>
<pre name="code" class="c">

&lt;mx:Script xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;
&lt;![CDATA[
import mx.controls.Alert;
import mx.core.Application;
import mx.events.DropdownEvent;
public var app:* = Application( Application.application );
private function comboBox_open(evt:DropdownEvent):void {
evt.currentTarget.dropdown.variableRowHeight = true;
}
]]&gt;
&lt;/mx:Script&gt;
&lt;mx:ComboBox id=”myComboBox” dataProvider=”{mx.core.Application.application.bbapp.cityXML}” labelField=”NAME”
close=”app.closeHandler(event)” cornerRadius=”0? dropdownStyleName=”gameSelectBox” visible=”false” fontSize=”12? open=”comboBox_open(event);”&gt;
&lt;mx:itemRenderer&gt;
&lt;mx:Component&gt;
&lt;mx:Label text=”{data.NAME}” paddingTop=”-5? paddingBottom=”-5?/&gt;
&lt;/mx:Component&gt;
&lt;/mx:itemRenderer&gt;
&lt;/mx:ComboBox&gt;
&lt;/mx:HBox&gt;
</pre>
<p>And here is the final output:<br />
<a href="http://dougdiego.com/wp-content/uploads/2008/10/padded.png"><img class="alignnone size-medium wp-image-100" title="Padded" src="http://dougdiego.com/wp-content/uploads/2008/10/padded.png" alt="" width="139" height="175" /></a></p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2008/11/02/adobe-flex-combobox-cell-padding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
