<?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; FormHeading</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/formheading/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>Styling individual FormItem labels using the labelStyleName style</title>
		<link>http://blog.flexexamples.com/2007/11/13/styling-individual-formitem-labels-using-the-labelstylename-style/</link>
		<comments>http://blog.flexexamples.com/2007/11/13/styling-individual-formitem-labels-using-the-labelstylename-style/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 05:41:15 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[FormHeading]]></category>
		<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[labelStyleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/13/styling-individual-formitem-labels-using-the-labelstylename-style/</guid>
		<description><![CDATA[<p>The following example shows you how you can style individual labels in a FormItem container in Flex by setting the labelStyleName style, as seen in the following snippet:</p> &#60;mx:Style&#62; .requiredLabel { color: red; fontSize: 12; fontWeight: bold; } &#60;/mx:Style&#62; &#60;mx:Form&#62; &#60;mx:FormItem label=&#34;Field 1:&#34; labelStyleName=&#34;requiredLabel&#34; required=&#34;true&#34;&#62; &#60;mx:Label id=&#34;lbl1&#34; text=&#34;{str}&#34; /&#62; &#60;/mx:FormItem&#62; &#60;/mx:Form&#62; <p class="alert">The labelStyleName style [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can style individual labels in a FormItem container in Flex by setting the <code>labelStyleName</code> style, as seen in the following snippet:</p>
<pre class="code">
&lt;mx:Style&gt;
    .requiredLabel {
        color: red;
        fontSize: 12;
        fontWeight: bold;
    }
&lt;/mx:Style&gt;

&lt;mx:Form&gt;
    &lt;mx:FormItem label=&quot;Field 1:&quot;
            <span style="color:red;">labelStyleName=&quot;requiredLabel&quot;</span>
            required=&quot;true&quot;&gt;
        &lt;mx:Label id=&quot;lbl1&quot; text=&quot;{str}&quot; /&gt;
    &lt;/mx:FormItem&gt;
&lt;/mx:Form&gt;
</pre>
<p class="alert">The labelStyleName style was added in Flex 3 build 186889 (Wed Nov 07 2007 or later). You may need to <a href="http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html">download a nightly build of the Flex 3 SDK from the Adobe Labs website</a>.</p>
<p>Full code after the jump.</p>
<p><span id="more-295"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_labelStyleName_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/13/styling-individual-formitem-labels-using-the-labelstylename-style/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style source="embeddedFonts.css" /&gt;
    &lt;mx:Style&gt;
        Form {
            fontFamily: ArialEmbedded;
        }

        FormHeading {
            color: haloSilver;
            fontSize: 24;
        }

        FormItem {
            labelStyleName: defaultLabel;
        }

        .defaultLabel {
            color: black;
            fontSize: 10;
            fontStyle: italic;
            fontWeight: normal;
        }

        .requiredLabel {
            color: red;
            fontSize: 12;
            fontWeight: bold;
        }
    &lt;/mx:Style&gt;

    &lt;mx:String id="str"&gt;
        &lt;![CDATA[The quick brown fox jumped over the lazy dog.]]&gt;
    &lt;/mx:String&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormHeading label="Some form heading!" /&gt;
        &lt;!-- override the default labelStyleName for the FormItem --&gt;
        &lt;mx:FormItem label="Field 1:"
                labelStyleName="requiredLabel"
                required="true"&gt;
            &lt;mx:Label id="lbl1" text="{str}" /&gt;
        &lt;/mx:FormItem&gt;

        &lt;!-- override the default labelStyleName for the FormItem --&gt;
        &lt;mx:FormItem label="Field 2:"
                labelStyleName="requiredLabel"
                required="true"&gt;
            &lt;mx:Label id="lbl2" text="{str}" /&gt;
        &lt;/mx:FormItem&gt;

        &lt;!-- default --&gt;
        &lt;mx:FormItem label="Field 3:"&gt;
            &lt;mx:Label id="lbl3" text="{str}" /&gt;
        &lt;/mx:FormItem&gt;

        &lt;!-- default --&gt;
        &lt;mx:FormItem label="Field 4:"&gt;
            &lt;mx:Label id="lbl4" text="{str}" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_labelStyleName_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/FormItem_labelStyleName_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Styling individual FormItem labels using the labelStyleName style on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/13/styling-individual-formitem-labels-using-the-labelstylename-style/',contentID: 'post-295',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'labelStyleName',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/13/styling-individual-formitem-labels-using-the-labelstylename-style/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing a Flex FormItem container&#8217;s indicator skin</title>
		<link>http://blog.flexexamples.com/2007/10/06/changing-a-flex-formitem-containers-indicator-skin/</link>
		<comments>http://blog.flexexamples.com/2007/10/06/changing-a-flex-formitem-containers-indicator-skin/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 06:19:06 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[FormHeading]]></category>
		<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[indicatorGap]]></category>
		<category><![CDATA[indicatorSkin]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/06/changing-a-flex-formitem-containers-indicator-skin/</guid>
		<description><![CDATA[<p>The following example shows how you can change the FormItem container&#8217;s indicator skin which appears when the form item&#8217;s required property is set to true.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_indicatorSkin_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/10/06/changing-a-flex-formitem-containers-indicator-skin/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top" backgroundColor="white"&#62; &#60;mx:Style&#62; FormItem { indicatorSkin: Embed(source="assets/asterisk_yellow.png"); indicatorGap: 24; /* pixels [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the FormItem container&#8217;s indicator skin which appears when the form item&#8217;s <code>required</code> property is set to <code>true</code>.</p>
<p>Full code after the jump.</p>
<p><span id="more-222"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_indicatorSkin_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/06/changing-a-flex-formitem-containers-indicator-skin/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        FormItem {
            indicatorSkin: Embed(source="assets/asterisk_yellow.png");
            indicatorGap: 24; /* pixels */
        }

        FormItemLabel {
            textAlign: left;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormHeading label="FORM HEADING" /&gt;
        &lt;mx:FormItem label="Name:" required="true"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="Email:" required="true"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="Phone number:"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_indicatorSkin_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/FormItem_indicatorSkin_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing a Flex FormItem container\&#039;s indicator skin on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/10/06/changing-a-flex-formitem-containers-indicator-skin/',contentID: 'post-222',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'indicatorGap,indicatorSkin',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/06/changing-a-flex-formitem-containers-indicator-skin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

