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

<channel>
	<title>Flex Examples &#187; titleIcon</title>
	<atom:link href="http://blog.flexexamples.com/tag/titleicon/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding a title icon to a Panel container in Flex</title>
		<link>http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 06:11:56 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Panel]]></category>
		<category><![CDATA[titleIcon]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can add an icon to a Flex Panel container&#8217;s title bar by setting the titleIcon property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_titleIcon_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/ --&#62; &#60;mx:Application name=&#34;Panel_titleIcon_test&#34; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;vertical&#34; verticalAlign=&#34;middle&#34; backgroundColor=&#34;white&#34;&#62; &#60;mx:String id=&#34;lorem&#34; source=&#34;lorem.txt&#34; /&#62; &#60;mx:Panel id=&#34;panel&#34; title=&#34;Panel title&#34; titleIcon=&#34;@Embed('assets/Panel.png')&#34;&#62; &#60;mx:Text id=&#34;txt&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can add an icon to a Flex Panel container&#8217;s title bar by setting the <code>titleIcon</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-835"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_titleIcon_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/ --&gt;
&lt;mx:Application name=&quot;Panel_titleIcon_test&quot;
        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:String id=&quot;lorem&quot; source=&quot;lorem.txt&quot; /&gt;

    &lt;mx:Panel id=&quot;panel&quot;
            title=&quot;Panel title&quot;
            titleIcon=&quot;@Embed('assets/Panel.png')&quot;&gt;
        &lt;mx:Text id=&quot;txt&quot;
                text=&quot;{lorem}&quot;
                width=&quot;500&quot;
                textAlign=&quot;justify&quot;
                selectable=&quot;false&quot; /&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_titleIcon_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Panel_titleIcon_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_titleIcon_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/ --&gt;
&lt;mx:Application name=&quot;Panel_titleIcon_test&quot;
        xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;
        initialize=&quot;init();&quot;&gt;

    &lt;mx:String id=&quot;lorem&quot; source=&quot;lorem.txt&quot; /&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Text;
            import mx.containers.Panel;

            [Embed(&quot;assets/Panel.png&quot;)]
            private const PanelTitleIcon:Class;

            private var panel:Panel;

            private function init():void {
                var txt:Text = new Text();
                txt.text = lorem;
                txt.selectable = false;
                txt.width = 500;
                txt.setStyle(&quot;textAlign&quot;, &quot;justify&quot;);

                panel = new Panel();
                panel.title = &quot;Panel title&quot;;
                panel.titleIcon = PanelTitleIcon;
                panel.addChild(txt);
                addChild(panel);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Adding a title icon to a Panel container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/',contentID: 'post-835',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'titleIcon',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/10/18/adding-a-title-icon-to-a-panel-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Adding a title icon to a Flex RichTextEditor control</title>
		<link>http://blog.flexexamples.com/2007/11/21/adding-a-title-icon-to-a-flex-richtexteditor-control/</link>
		<comments>http://blog.flexexamples.com/2007/11/21/adding-a-title-icon-to-a-flex-richtexteditor-control/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 03:48:03 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[titleIcon]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/adding-a-title-icon-to-a-flex-richtexteditor-control/</guid>
		<description><![CDATA[<p>The following example shows how you can add a title icon to a Flex RichTextEditor control.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_titleIcon_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/11/21/adding-a-title-icon-to-a-flex-richtexteditor-control/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ [Bindable] [Embed("RichTextEditor.png")] private var RichTextEditorIcon:Class; ]]&#62; &#60;/mx:Script&#62; &#60;mx:RichTextEditor id="richTextEditor" title="Rich Text Editor" titleIcon="{RichTextEditorIcon}" /&#62; &#60;/mx:Application&#62; <p [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can add a title icon to a Flex RichTextEditor control.</p>
<p>Full code after the jump.</p>
<p><span id="more-320"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_titleIcon_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/11/21/adding-a-title-icon-to-a-flex-richtexteditor-control/ --&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[
            [Bindable]
            [Embed("RichTextEditor.png")]
            private var RichTextEditorIcon:Class;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:RichTextEditor id="richTextEditor"
            title="Rich Text Editor"
            titleIcon="{RichTextEditorIcon}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_titleIcon_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_titleIcon_test/bin/main.html" width="100%" height="400"></iframe></p>
<p>If you want to embed the image within the MXML script instead of ActionScript, you could do something like the following snippet:</p>
<pre class="code">
&lt;mx:RichTextEditor id="richTextEditor"
        title="Rich Text Editor"
        titleIcon="@Embed('RichTextEditor.png')" /&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Adding a title icon to a Flex RichTextEditor control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/21/adding-a-title-icon-to-a-flex-richtexteditor-control/',contentID: 'post-320',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'titleIcon',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/11/21/adding-a-title-icon-to-a-flex-richtexteditor-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a title icon to a Flex Alert control</title>
		<link>http://blog.flexexamples.com/2007/10/22/adding-a-title-icon-to-a-flex-alert-control/</link>
		<comments>http://blog.flexexamples.com/2007/10/22/adding-a-title-icon-to-a-flex-alert-control/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 04:30:38 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Alert]]></category>
		<category><![CDATA[iconClass]]></category>
		<category><![CDATA[titleIcon]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/22/adding-a-title-icon-to-a-flex-alert-control/</guid>
		<description><![CDATA[<p>The following example shows how you can set both the titleIcon property and iconClass property for a Flex Alert control.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Alert_titleIcon_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/10/22/adding-a-title-icon-to-a-flex-alert-control/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ import mx.controls.Alert; [Embed(source="assets/bulletCritical.png")] private var BulletCritical:Class; [Embed(source="assets/iconCritical.png")] private var IconCritical:Class; private var [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set both the <code>titleIcon</code> property and <code>iconClass</code> property for a Flex Alert control.</p>
<p>Full code after the jump.</p>
<p><span id="more-246"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Alert_titleIcon_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/10/22/adding-a-title-icon-to-a-flex-alert-control/ --&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.controls.Alert;

            [Embed(source="assets/bulletCritical.png")]
            private var BulletCritical:Class;

            [Embed(source="assets/iconCritical.png")]
            private var IconCritical:Class;

            private var alert:Alert;

            private function init():void {
                var alertText:String = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse rutrum metus nonummy augue. In hac habitasse platea dictumst. Nulla arcu libero, nonummy non, suscipit a, mollis non, augue. Maecenas porttitor urna vel enim. Nam eget tortor. Mauris facilisis suscipit felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin nunc turpis, venenatis non, laoreet at, fringilla nec, purus. Sed sodales. Sed turpis. Vestibulum sagittis justo id metus. Sed placerat, nibh lobortis mattis adipiscing, sapien wisi interdum arcu, nec vehicula sem tortor id nibh.";
                var alertTitle:String = "The quick brown fox jumped over the lazy dog.";
                alert = Alert.show(alertText, alertTitle, 4, null, null, IconCritical);
                alert.titleIcon = BulletCritical;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Button label="Launch alert" click="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Alert_titleIcon_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Alert_titleIcon_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Adding a title icon to a Flex Alert control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/10/22/adding-a-title-icon-to-a-flex-alert-control/',contentID: 'post-246',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'iconClass,titleIcon',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/10/22/adding-a-title-icon-to-a-flex-alert-control/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting custom status messages in a Flex Panel container</title>
		<link>http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/</link>
		<comments>http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 14:59:42 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Embed]]></category>
		<category><![CDATA[Panel]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[statusStyleName]]></category>
		<category><![CDATA[titleIcon]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/</guid>
		<description><![CDATA[<p>The following example shows how you can set custom status messages in a Flex Panel container by setting the aptly named status property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_status_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ [Bindable] [Embed(source="assets/delete.png")] public var DeleteIcon:Class; ]]&#62; &#60;/mx:Script&#62; &#60;mx:String id="lorem" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set custom status messages in a Flex Panel container by setting the aptly named <code>status</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-151"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_status_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/ --&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[
            [Bindable]
            [Embed(source="assets/delete.png")]
            public var DeleteIcon:Class;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:String id="lorem" source="lorem.txt" /&gt;

    &lt;mx:Panel id="panel"
            titleIcon="{DeleteIcon}"
            title="WARNING"
            status="I'm a custom status message!"
            width="80%"&gt;
        &lt;mx:Text text="{lorem}" width="100%" /&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_status_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Panel_status_test/bin/main.html" width="100%" height="200"></iframe></p>
<p class="new">If you want to customize the appearance of the status message in the Panel, you can set the <code>statusStyleName</code> style, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_statusStyleName_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        .myStatusStyle {
            fontWeight: bold;
            color: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:String id="lorem"&gt;
        &lt;![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In malesuada sapien eu ipsum. Integer id diam in sapien lobortis pulvinar. Donec mauris augue, sodales vel, luctus elementum, convallis eget, sapien. Suspendisse pretium elementum erat. Ut posuere ornare sem. Nam vestibulum luctus mi. Praesent feugiat blandit ante. Fusce vel massa. Praesent diam. Maecenas risus. Aliquam erat volutpat. Vivamus eget velit vel turpis venenatis dictum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam mattis nibh. Quisque nec odio.]]&gt;
    &lt;/mx:String&gt;

    &lt;mx:Panel id="panel"
            title="WARNING"
            status="I'm a custom status message!"
            statusStyleName="myStatusStyle"
            width="320"&gt;
        &lt;mx:Text text="{lorem}" width="100%" /&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_statusStyleName_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Panel_statusStyleName_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting custom status messages in a Flex Panel container on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/',contentID: 'post-151',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'status,statusStyleName,titleIcon',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/08/31/setting-custom-status-messages-in-a-flex-panel-container/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

