<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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: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>Comments on: Flex 2.0.1 ComboBox with icon support.</title>
	<atom:link href="http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/</link>
	<description>Impressions, rants, wow moments, general tips, and examples in and around Adobe Flex 2.0</description>
	<lastBuildDate>Sat, 14 Nov 2009 15:58:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott Schafer</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8245</link>
		<dc:creator>Scott Schafer</dc:creator>
		<pubDate>Tue, 29 Sep 2009 21:47:55 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8245</guid>
		<description>Great work! Incidentally, I compiled this with the 3.4 SDK (crossing my fingers), and it worked perfectly. Thanks so much.</description>
		<content:encoded><![CDATA[<p>Great work! Incidentally, I compiled this with the 3.4 SDK (crossing my fingers), and it worked perfectly. Thanks so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jessie Williams</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8231</link>
		<dc:creator>Jessie Williams</dc:creator>
		<pubDate>Wed, 01 Jul 2009 19:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8231</guid>
		<description>Nice job! I wonder if there is any way to override the prompt attribute. This would be helpful for the default selection.</description>
		<content:encoded><![CDATA[<p>Nice job! I wonder if there is any way to override the prompt attribute. This would be helpful for the default selection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Herman</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8222</link>
		<dc:creator>Tim Herman</dc:creator>
		<pubDate>Tue, 19 May 2009 17:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8222</guid>
		<description>I had the same problem.  The issue is that the setter doesn&#039;t execute when you are setting a property to the same value it currently holds.  In this case, setting iconField to &quot;icon&quot; exposes the problem.  

Fix --   initialize the DropDownFactory iconField property to _iconField in the constructor:

        public function DexIconCombobox():void
        {
            super();
            
            //setup the properties on the factory before init so that
            //the drop down will gracefully adopt them.
            internalDropdownFactory.properties = { iconField:_iconField,iconFunction:null };
            dropdownFactory = internalDropdownFactory;
        }</description>
		<content:encoded><![CDATA[<p>I had the same problem.  The issue is that the setter doesn&#8217;t execute when you are setting a property to the same value it currently holds.  In this case, setting iconField to &#8220;icon&#8221; exposes the problem.  </p>
<p>Fix &#8212;   initialize the DropDownFactory iconField property to _iconField in the constructor:</p>
<p>        public function DexIconCombobox():void<br />
        {<br />
            super();</p>
<p>            //setup the properties on the factory before init so that<br />
            //the drop down will gracefully adopt them.<br />
            internalDropdownFactory.properties = { iconField:_iconField,iconFunction:null };<br />
            dropdownFactory = internalDropdownFactory;<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gautham</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8204</link>
		<dc:creator>Gautham</dc:creator>
		<pubDate>Sat, 21 Mar 2009 15:37:29 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8204</guid>
		<description>Hi , 
I have a problem in displaying the icon in the combobox. what i did is in creation complete i made the selectedItem of the combobox to display a paricular item .The item label is displayed correctly but not the icon for that label.Instead it shows the icon of the first item .
This occurs only when the file is first loaded.
then when i select a paticular item from the combobx its labels and the icons are shown correctly.what went wrong in this ?

thanks 
Gautham</description>
		<content:encoded><![CDATA[<p>Hi ,<br />
I have a problem in displaying the icon in the combobox. what i did is in creation complete i made the selectedItem of the combobox to display a paricular item .The item label is displayed correctly but not the icon for that label.Instead it shows the icon of the first item .<br />
This occurs only when the file is first loaded.<br />
then when i select a paticular item from the combobx its labels and the icons are shown correctly.what went wrong in this ?</p>
<p>thanks<br />
Gautham</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay Anand Mareddy</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8200</link>
		<dc:creator>Vijay Anand Mareddy</dc:creator>
		<pubDate>Mon, 16 Mar 2009 21:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8200</guid>
		<description>FYI, iconFunction is working fine but NOT iconField (Yes, i do have icon field in each dataItem)</description>
		<content:encoded><![CDATA[<p>FYI, iconFunction is working fine but NOT iconField (Yes, i do have icon field in each dataItem)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rocky</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8158</link>
		<dc:creator>Rocky</dc:creator>
		<pubDate>Thu, 18 Dec 2008 10:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8158</guid>
		<description>Ok I&#039;m pretty new at all this, but one simple questions, how do I exactly use / attach this to my .fla?</description>
		<content:encoded><![CDATA[<p>Ok I&#8217;m pretty new at all this, but one simple questions, how do I exactly use / attach this to my .fla?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SmartLogic Solutions Blog &#187; Blog Archive &#187; Displaying an Image in a ComboBox</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8147</link>
		<dc:creator>SmartLogic Solutions Blog &#187; Blog Archive &#187; Displaying an Image in a ComboBox</dc:creator>
		<pubDate>Mon, 01 Dec 2008 16:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8147</guid>
		<description>[...] was surprised that a quick search didn&#8217;t find any components to allow this. The closest was a post by Jason Hawryluk, however this required the image to be embedded into the [...]</description>
		<content:encoded><![CDATA[<p>[...] was surprised that a quick search didn&#8217;t find any components to allow this. The closest was a post by Jason Hawryluk, however this required the image to be embedded into the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SGIA</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8144</link>
		<dc:creator>SGIA</dc:creator>
		<pubDate>Sun, 23 Nov 2008 01:31:51 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8144</guid>
		<description>Hello, thanks for that, very nice.
I have a question - I am using your combo box in a repeater component and setting the selectedIndex value based on the value in the dataProvider when the user changes from one data set to the next. 

If I have the repeater component set to &quot;recycleChildren&quot;, it randomly skips updating the   image in the ComboBoxes to reflect the value in selectedIndex.  The selectedIndex is correct, however the control isn&#039;t updating and displaying the icon for the selected index item. 

If I set recycleChildren to false, it updates fine however the performance is of course then lagging. 

Any ideas?

Thanks</description>
		<content:encoded><![CDATA[<p>Hello, thanks for that, very nice.<br />
I have a question &#8211; I am using your combo box in a repeater component and setting the selectedIndex value based on the value in the dataProvider when the user changes from one data set to the next. </p>
<p>If I have the repeater component set to &#8220;recycleChildren&#8221;, it randomly skips updating the   image in the ComboBoxes to reflect the value in selectedIndex.  The selectedIndex is correct, however the control isn&#8217;t updating and displaying the icon for the selected index item. </p>
<p>If I set recycleChildren to false, it updates fine however the performance is of course then lagging. </p>
<p>Any ideas?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mindy</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8139</link>
		<dc:creator>mindy</dc:creator>
		<pubDate>Tue, 11 Nov 2008 01:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8139</guid>
		<description>thank you soo much for this post! i was trying to code this and figure it out. i&#039;m very appreciative.</description>
		<content:encoded><![CDATA[<p>thank you soo much for this post! i was trying to code this and figure it out. i&#8217;m very appreciative.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xcom</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8137</link>
		<dc:creator>xcom</dc:creator>
		<pubDate>Mon, 10 Nov 2008 15:02:34 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8137</guid>
		<description>and to get the value of the item as I do</description>
		<content:encoded><![CDATA[<p>and to get the value of the item as I do</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Murray Eaton</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8133</link>
		<dc:creator>Murray Eaton</dc:creator>
		<pubDate>Tue, 04 Nov 2008 22:55:39 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8133</guid>
		<description>Nice stable code. Thank you for your insight!</description>
		<content:encoded><![CDATA[<p>Nice stable code. Thank you for your insight!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8131</link>
		<dc:creator>Igor</dc:creator>
		<pubDate>Fri, 31 Oct 2008 18:39:17 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8131</guid>
		<description>Thanks for this super code</description>
		<content:encoded><![CDATA[<p>Thanks for this super code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8098</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Wed, 10 Sep 2008 19:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8098</guid>
		<description>How can you truncate the first item in list or I should say the one in the prompt?</description>
		<content:encoded><![CDATA[<p>How can you truncate the first item in list or I should say the one in the prompt?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Grindall</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8090</link>
		<dc:creator>John Grindall</dc:creator>
		<pubDate>Fri, 15 Aug 2008 14:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8090</guid>
		<description>Sorry solved it - the loader hadn&#039;t finished loading when the CellRenderer drew the icon.</description>
		<content:encoded><![CDATA[<p>Sorry solved it &#8211; the loader hadn&#8217;t finished loading when the CellRenderer drew the icon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Grindall</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8088</link>
		<dc:creator>John Grindall</dc:creator>
		<pubDate>Thu, 14 Aug 2008 09:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8088</guid>
		<description>Hi there, great tutorial! I&#039;m working on a component in Flash AS3, in which you can place any text, image or equation inside a comboBox. I have set the iconFunction like this:

iconFunction = function(item:Object):Object {
 var o:Object=getIcon(item.data);
 return o;
}
public function getIcon(i:int):Object{
 if(i&lt;0){
  return null;
  }
 if(contentsArray[i].type==&quot;EQN&quot;){
  var m1:MathObject=new MathObject(contentsArray[i].param);
  return m1;
  }
 else if(contentsArray[i].type==&quot;IMG&quot;){
  var m2:ImgObject=new ImgObject(contentsArray[i].param);
  return m2;
 }
 else{
  return null;
 }
}

My MathObject and ImageObject both extend MovieClip and have some data associated with them (xml string or url string is the .param) 

My problem is that whilst MathObjects work fine, the images in ImgObjects jump up about 10 pixels when you rollover them and I can&#039;t figure out why. It works fine if the MovieClips are in the library, and the mathobjects are drawn dynamically and work fine, but Img objects don&#039;t - I&#039;ve tried using a Loader and also getting the bitmap from the loader and just using that, but they still jump.  Anyone got any ideas??
Thanks!
John G</description>
		<content:encoded><![CDATA[<p>Hi there, great tutorial! I&#8217;m working on a component in Flash AS3, in which you can place any text, image or equation inside a comboBox. I have set the iconFunction like this:</p>
<p>iconFunction = function(item:Object):Object {<br />
 var o:Object=getIcon(item.data);<br />
 return o;<br />
}<br />
public function getIcon(i:int):Object{<br />
 if(i&lt;0){<br />
  return null;<br />
  }<br />
 if(contentsArray[i].type==&#8221;EQN&#8221;){<br />
  var m1:MathObject=new MathObject(contentsArray[i].param);<br />
  return m1;<br />
  }<br />
 else if(contentsArray[i].type==&#8221;IMG&#8221;){<br />
  var m2:ImgObject=new ImgObject(contentsArray[i].param);<br />
  return m2;<br />
 }<br />
 else{<br />
  return null;<br />
 }<br />
}</p>
<p>My MathObject and ImageObject both extend MovieClip and have some data associated with them (xml string or url string is the .param) </p>
<p>My problem is that whilst MathObjects work fine, the images in ImgObjects jump up about 10 pixels when you rollover them and I can&#8217;t figure out why. It works fine if the MovieClips are in the library, and the mathobjects are drawn dynamically and work fine, but Img objects don&#8217;t &#8211; I&#8217;ve tried using a Loader and also getting the bitmap from the loader and just using that, but they still jump.  Anyone got any ideas??<br />
Thanks!<br />
John G</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ej</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8083</link>
		<dc:creator>ej</dc:creator>
		<pubDate>Mon, 04 Aug 2008 16:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8083</guid>
		<description>What is the following code doing? How can it return a class from just text?

if (data[iconField].length() != 0)
		                 {
		                    icon = String(data[iconField]);
		                    if (icon != null)
		                    {
		                        iconClass = Class(systemManager.getDefinitionByName(icon));
		                        if (iconClass){
		                            return iconClass;
		                        }
		                        return document[icon];
		                    }
		                 }</description>
		<content:encoded><![CDATA[<p>What is the following code doing? How can it return a class from just text?</p>
<p>if (data[iconField].length() != 0)<br />
		                 {<br />
		                    icon = String(data[iconField]);<br />
		                    if (icon != null)<br />
		                    {<br />
		                        iconClass = Class(systemManager.getDefinitionByName(icon));<br />
		                        if (iconClass){<br />
		                            return iconClass;<br />
		                        }<br />
		                        return document[icon];<br />
		                    }<br />
		                 }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8079</link>
		<dc:creator>Vijay</dc:creator>
		<pubDate>Sun, 27 Jul 2008 22:23:07 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8079</guid>
		<description>In my posting above,by this line --&gt;&quot;Then change the icon field for each the object in your iconcombobox.dataProvider&quot; ---

I meant programmatically based on what image you want to see for each ITEM, change the @icon property of each of the iconcombobox.dataprovider.object</description>
		<content:encoded><![CDATA[<p>In my posting above,by this line &#8211;&gt;&#8221;Then change the icon field for each the object in your iconcombobox.dataProvider&#8221; &#8212;</p>
<p>I meant programmatically based on what image you want to see for each ITEM, change the @icon property of each of the iconcombobox.dataprovider.object</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8078</link>
		<dc:creator>Vijay</dc:creator>
		<pubDate>Sun, 27 Jul 2008 22:17:28 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8078</guid>
		<description>Joeren, If you have 100 images and you need to toggle between them...then you have to load/embed all 100 images..then use an IconFunction and provide to the IconComboBox. Then change the icon field for each the object in your iconcombobox.dataProvider.

Also make this change in the IconCombobox.as (courtesy of Glinto see previous posting)

override public function set measuredWidth(value:Number):void
{
if (displayIconObject)
super.measuredWidth = value + getStyle(”cornerRadius”);
else
super.measuredWidth = value + (DisplayObject(displayIconObject).width+getStyle(”cornerRadius”));
}</description>
		<content:encoded><![CDATA[<p>Joeren, If you have 100 images and you need to toggle between them&#8230;then you have to load/embed all 100 images..then use an IconFunction and provide to the IconComboBox. Then change the icon field for each the object in your iconcombobox.dataProvider.</p>
<p>Also make this change in the IconCombobox.as (courtesy of Glinto see previous posting)</p>
<p>override public function set measuredWidth(value:Number):void<br />
{<br />
if (displayIconObject)<br />
super.measuredWidth = value + getStyle(”cornerRadius”);<br />
else<br />
super.measuredWidth = value + (DisplayObject(displayIconObject).width+getStyle(”cornerRadius”));<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8077</link>
		<dc:creator>Vijay</dc:creator>
		<pubDate>Sun, 27 Jul 2008 22:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8077</guid>
		<description>Nick, you need to use the iconFunction.</description>
		<content:encoded><![CDATA[<p>Nick, you need to use the iconFunction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8074</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Fri, 04 Jul 2008 08:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://flexibleexperiments.wordpress.com/2007/04/28/flex-201-combobox-with-icon-support/#comment-8074</guid>
		<description>Thanks for this great code. I also need to programatically load the icons. Basically, I have a folder of xml files representing translations of the user interface (English, French, German, etc). For each xml file, there is an icon file (png) of the flag for that language.

The folder is scanned and all available languages are listed in the combo box. How therefore do I dynamically load the icon too?

i.e. how do I programatically set the icon file to &quot;en_US.png&quot; when programatically creating the drop down list?

Many thanks in advance for any advice you can give!</description>
		<content:encoded><![CDATA[<p>Thanks for this great code. I also need to programatically load the icons. Basically, I have a folder of xml files representing translations of the user interface (English, French, German, etc). For each xml file, there is an icon file (png) of the flag for that language.</p>
<p>The folder is scanned and all available languages are listed in the combo box. How therefore do I dynamically load the icon too?</p>
<p>i.e. how do I programatically set the icon file to &#8220;en_US.png&#8221; when programatically creating the drop down list?</p>
<p>Many thanks in advance for any advice you can give!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
