<?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/"
		>
<channel>
	<title>Comments on: Adding icons to Panel containers</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Asha</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-8931</link>
		<dc:creator>Asha</dc:creator>
		<pubDate>Fri, 28 Jan 2011 20:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-8931</guid>
		<description>Is it possible to have the icon positioned to the far right instead of on the left?</description>
		<content:encoded><![CDATA[<p>Is it possible to have the icon positioned to the far right instead of on the left?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john desouza</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-8606</link>
		<dc:creator>john desouza</dc:creator>
		<pubDate>Mon, 06 Dec 2010 06:37:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-8606</guid>
		<description>Sorry I need to display image in panel but not in canvas.</description>
		<content:encoded><![CDATA[<p>Sorry I need to display image in panel but not in canvas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john desouza</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-8605</link>
		<dc:creator>john desouza</dc:creator>
		<pubDate>Mon, 06 Dec 2010 06:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-8605</guid>
		<description>HI All,

      I need to display image in canvas. The image i am displaying is larger then the panel, due to which i cn&#039;t see the image completely. I tried to add the scroll bars, which i am able to display but they are disabled. Please let me know the solution.

Thanks,
 Jhon</description>
		<content:encoded><![CDATA[<p>HI All,</p>
<p>      I need to display image in canvas. The image i am displaying is larger then the panel, due to which i cn&#8217;t see the image completely. I tried to add the scroll bars, which i am able to display but they are disabled. Please let me know the solution.</p>
<p>Thanks,<br />
 Jhon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry Becker</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-7394</link>
		<dc:creator>Barry Becker</dc:creator>
		<pubDate>Wed, 31 Mar 2010 15:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-7394</guid>
		<description>Is it possible to have the icon positioned on the far right instead of on the left?</description>
		<content:encoded><![CDATA[<p>Is it possible to have the icon positioned on the far right instead of on the left?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FlexBeginner</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-214</link>
		<dc:creator>FlexBeginner</dc:creator>
		<pubDate>Tue, 02 Dec 2008 15:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-214</guid>
		<description>Hi,

Is there a way to make the image thats been added to panel titleBar to make it visible and invisible with a button click ?

Thank you for the help in advance</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Is there a way to make the image thats been added to panel titleBar to make it visible and invisible with a button click ?</p>
<p>Thank you for the help in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-215</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 27 Jun 2008 17:41:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-215</guid>
		<description>Joel,

Check out Ben Stucki&#039;s IconUtility class at &lt;a href=&quot;http://blog.benstucki.net/?p=42&quot; rel=&quot;nofollow&quot;&gt;&lt;u&gt;IconUtility Component for Dynamic Run-Time Icons&lt;/u&gt;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>Joel,</p>
<p>Check out Ben Stucki&#8217;s IconUtility class at <a href="http://blog.benstucki.net/?p=42" rel="nofollow"><u>IconUtility Component for Dynamic Run-Time Icons</u></a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-213</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Fri, 27 Jun 2008 15:02:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-213</guid>
		<description>Is there any way of getting around embedding the titleIcon and being able to populate it dynamically?</description>
		<content:encoded><![CDATA[<p>Is there any way of getting around embedding the titleIcon and being able to populate it dynamically?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stranger</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-209</link>
		<dc:creator>Stranger</dc:creator>
		<pubDate>Wed, 30 Jan 2008 06:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-209</guid>
		<description>Hi,

I want to shuffle the panels. Say for Example, if i have two panels that are created at run time using action script. I have one panel after the other in a canvas vertically. If i drag one panel and drop it over the other panel, the dragged panel must be placed on the position where the other panel is and the entire order of panels must get shuffled.

If its confusing, in the above example, if i drag the left panel and drop it over the right panel, the right should come to left and the left panel should come to right.

How can i do this.

Any suggestions or example.

Thanks for the help in advance.

Stranger</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to shuffle the panels. Say for Example, if i have two panels that are created at run time using action script. I have one panel after the other in a canvas vertically. If i drag one panel and drop it over the other panel, the dragged panel must be placed on the position where the other panel is and the entire order of panels must get shuffled.</p>
<p>If its confusing, in the above example, if i drag the left panel and drop it over the right panel, the right should come to left and the left panel should come to right.</p>
<p>How can i do this.</p>
<p>Any suggestions or example.</p>
<p>Thanks for the help in advance.</p>
<p>Stranger</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adam</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-208</link>
		<dc:creator>adam</dc:creator>
		<pubDate>Mon, 14 Jan 2008 00:48:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-208</guid>
		<description>Peter,

Thank you for the quick response.  Your code worked first time around for me, so thank you for that as well.  I will take your advice, I have already posted the question at FlexCoders.  I agree best method probably would be extending the Panel. Peter...thanks again.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Thank you for the quick response.  Your code worked first time around for me, so thank you for that as well.  I will take your advice, I have already posted the question at FlexCoders.  I agree best method probably would be extending the Panel. Peter&#8230;thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/comment-page-1/#comment-210</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Sun, 13 Jan 2008 08:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/#comment-210</guid>
		<description>Adam,

Not sure if this is the &quot;best&quot; way, but this seems to work (although it does use mx_internal namespace, so I can&#039;t guarantee it will work this way in the future (or in past versions).

Since I don&#039;t have a very high confidence level in this code, I&#039;ll just post it in the comments here instead of making it a new entry.

&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.core.UIComponent;
            import mx.controls.Image;

            private function init():void {
                var titleBar:UIComponent = panel.mx_internal::getTitleBar();
                var titleIcon:Bitmap = panel.mx_internal::titleIconObject;

                var icon:Image = new Image();
                icon.source = new Bitmap(titleIcon.bitmapData);
                icon.toolTip = &quot;I&#039;m a mystery tool tip&quot;;
                icon.width = titleIcon.width;
                icon.height = titleIcon.height;
                icon.x = titleIcon.x;
                icon.y = titleIcon.y;

                var depth:int = titleBar.getChildIndex(titleIcon);
                titleBar.removeChildAt(depth);
                titleBar.addChildAt(icon, depth);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Panel id=&quot;panel&quot;
            title=&quot;My icon has a tool tip&quot;
            titleIcon=&quot;@Embed(&#039;asterisk_orange.png&#039;)&quot;
            width=&quot;320&quot;
            height=&quot;120&quot;
            creationComplete=&quot;init();&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

You may want to try asking on a high volume list, such as FlexCoders and see if you can get any other suggestions. It may be better to extend the Panel class and use an Image control instead of the Bitmap display object. Plus, by extending Panel, you could add a custom parameter (such as titleIconToolTip which would make the code easier to reuse.

Hope that helps,
Peter</description>
		<content:encoded><![CDATA[<p>Adam,</p>
<p>Not sure if this is the &#8220;best&#8221; way, but this seems to work (although it does use mx_internal namespace, so I can&#8217;t guarantee it will work this way in the future (or in past versions).</p>
<p>Since I don&#8217;t have a very high confidence level in this code, I&#8217;ll just post it in the comments here instead of making it a new entry.</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- <a href="http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/" rel="nofollow">http://blog.flexexamples.com/2007/08/02/adding-icons-to-panel-containers/</a> --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.core.UIComponent;
            import mx.controls.Image;

            private function init():void {
                var titleBar:UIComponent = panel.mx_internal::getTitleBar();
                var titleIcon:Bitmap = panel.mx_internal::titleIconObject;

                var icon:Image = new Image();
                icon.source = new Bitmap(titleIcon.bitmapData);
                icon.toolTip = "I'm a mystery tool tip";
                icon.width = titleIcon.width;
                icon.height = titleIcon.height;
                icon.x = titleIcon.x;
                icon.y = titleIcon.y;

                var depth:int = titleBar.getChildIndex(titleIcon);
                titleBar.removeChildAt(depth);
                titleBar.addChildAt(icon, depth);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Panel id="panel"
            title="My icon has a tool tip"
            titleIcon="@Embed('asterisk_orange.png')"
            width="320"
            height="120"
            creationComplete="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>You may want to try asking on a high volume list, such as FlexCoders and see if you can get any other suggestions. It may be better to extend the Panel class and use an Image control instead of the Bitmap display object. Plus, by extending Panel, you could add a custom parameter (such as titleIconToolTip which would make the code easier to reuse.</p>
<p>Hope that helps,<br />
Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

