<?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; FormItem</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/formitem/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>Setting the FormItem label width in a Form container in Flex</title>
		<link>http://blog.flexexamples.com/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 07:59:56 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[FormItem]]></category>
		<category><![CDATA[labelWidth]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2141</guid>
		<description><![CDATA[<p>The following example shows how you can set the label width on a Form container in Flex by setting the labelWidth style.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/ --&#62; &#60;mx:Application name=&#34;Form_labelWidth_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:ApplicationControlBar dock=&#34;true&#34;&#62; &#60;mx:Form styleName=&#34;plain&#34;&#62; &#60;mx:FormItem label=&#34;labelWidth:&#34;&#62; &#60;mx:HSlider id=&#34;sldr&#34; minimum=&#34;50&#34; maximum=&#34;150&#34; value=&#34;100&#34; liveDragging=&#34;true&#34; /&#62; &#60;/mx:FormItem&#62; &#60;/mx:Form&#62; &#60;/mx:ApplicationControlBar&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the label width on a Form container in Flex by setting the <code>labelWidth</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-2141"></span></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;Form_labelWidth_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;labelWidth:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HSlider</span> id=<span style="color: #ff0000;">&quot;sldr&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;50&quot;</span></span>
<span style="color: #000000;">                        maximum=<span style="color: #ff0000;">&quot;150&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                        liveDragging=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> id=<span style="color: #ff0000;">&quot;frm&quot;</span></span>
<span style="color: #000000;">            labelWidth=<span style="color: #ff0000;">&quot;{sldr.value}&quot;</span></span>
<span style="color: #000000;">            backgroundColor=<span style="color: #ff0000;">&quot;yellow&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormHeading</span> label=<span style="color: #ff0000;">&quot;Form Heading&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Form Item:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;SDK version:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span> initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Flash Player version:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;{Capabilities.version}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>You can also set the <code>labelWidth</code> property in an external .CSS file or &lt;Style/&gt; block, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;Form_labelWidth_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        Form {
            labelWidth: 75;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> id=<span style="color: #ff0000;">&quot;frm&quot;</span></span>
<span style="color: #000000;">            backgroundColor=<span style="color: #ff0000;">&quot;yellow&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormHeading</span> label=<span style="color: #ff0000;">&quot;Form Heading&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Form Item:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;SDK version:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span> initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Flash Player version:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;{Capabilities.version}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Or, you can set the <code>labelWidth</code> style using ActionScript, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;Form_labelWidth_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.events.SliderEvent;</span>
&nbsp;
<span style="color: #339933;">            protected function sldr_changeHandler(evt:SliderEvent):void {</span>
<span style="color: #339933;">                frm.setStyle(&quot;labelWidth&quot;, evt.value);</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;labelWidth:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HSlider</span> id=<span style="color: #ff0000;">&quot;sldr&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;50&quot;</span></span>
<span style="color: #000000;">                        maximum=<span style="color: #ff0000;">&quot;150&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                        liveDragging=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;sldr_changeHandler(event);&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> id=<span style="color: #ff0000;">&quot;frm&quot;</span></span>
<span style="color: #000000;">            backgroundColor=<span style="color: #ff0000;">&quot;yellow&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormHeading</span> label=<span style="color: #ff0000;">&quot;Form Heading&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Form Item:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;The quick brown fox jumps over the lazy dog&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;SDK version:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span> initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Flash Player version:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;{Capabilities.version}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the FormItem label width in a Form container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/',contentID: 'post-2141',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Form,FormItem,labelWidth',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/2009/11/01/setting-the-formitem-label-width-in-a-form-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Toggling form item visibility in a Form container in Flex</title>
		<link>http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 06:32:47 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[includeInLayout]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can toggle FormItem containers in a Flex Form container by setting the includeInLayout and visible properties.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_includeInLayout_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/ --&#62; &#60;mx:Application name="FormItem_includeInLayout_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; Form { indicatorGap: 0; paddingLeft: 0; paddingRight: 0; paddingTop: 0; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can toggle FormItem containers in a Flex Form container by setting the <code>includeInLayout</code> and <code>visible</code> properties.</p>
<p>Full code after the jump.</p>
<p><span id="more-817"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_includeInLayout_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/ --&gt;
&lt;mx:Application name="FormItem_includeInLayout_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        Form {
            indicatorGap: 0;
            paddingLeft: 0;
            paddingRight: 0;
            paddingTop: 0;
            paddingBottom: 0;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="bccButton"
                label="Show BCC"
                toggle="true"
                selected="false" /&gt;
        &lt;mx:Button id="fromButton"
                label="Show From"
                toggle="true"
                selected="false" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:HBox width="100%"&gt;
        &lt;mx:Button id="sendButton"
                label="Send"
                height="100%" /&gt;
        &lt;mx:Form width="100%"&gt;
            &lt;mx:FormItem label="From:"
                    includeInLayout="{fromButton.selected}"
                    visible="{fromButton.selected}"
                    width="100%"&gt;
                &lt;mx:ComboBox id="fromComboBox"
                        width="100%" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="To:" width="100%"&gt;
                &lt;mx:TextInput id="toTextInput"
                        width="100%" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="CC:" width="100%"&gt;
                &lt;mx:TextInput id="ccTextInput"
                        width="100%" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="BCC:"
                    includeInLayout="{bccButton.selected}"
                    visible="{bccButton.selected}"
                    width="100%"&gt;
                &lt;mx:TextInput id="bccTextInput"
                        width="100%" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="Subject:"
                    width="100%"&gt;
                &lt;mx:TextInput id="subjectTextInput"
                        width="100%" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:HBox&gt;

    &lt;mx:TextArea id="bodyTextArea"
            width="100%"
            height="100%" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_includeInLayout_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_includeInLayout_test/bin/main.html" width="100%" height="350"></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/FormItem_includeInLayout_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/ --&gt;
&lt;mx:Application name="FormItem_includeInLayout_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.binding.utils.BindingUtils;
            import mx.containers.ApplicationControlBar;
            import mx.containers.Form;
            import mx.containers.FormItem;
            import mx.containers.HBox;
            import mx.controls.Button;
            import mx.controls.ComboBox;
            import mx.controls.TextArea;
            import mx.controls.TextInput;

            private var bccButton:Button;
            private var bccFormItem:FormItem;
            private var bccTextInput:TextInput;
            private var bodyTextArea:TextArea;
            private var ccFormItem:FormItem;
            private var ccTextInput:TextInput;
            private var fromButton:Button;
            private var fromComboBox:ComboBox;
            private var fromFormItem:FormItem;
            private var sendButton:Button;
            private var subjectFormItem:FormItem;
            private var subjectTextInput:TextInput;
            private var toFormItem:FormItem;
            private var toTextInput:TextInput;

            private function init():void {
                bccButton = new Button();
                bccButton.label = "Show BCC";
                bccButton.toggle = true;
                bccButton.selected = true;
                bccButton.addEventListener(Event.CHANGE,
                            bccButton_change);

                fromButton = new Button();
                fromButton.label = "Show From";
                fromButton.toggle = true;
                fromButton.selected = true;
                fromButton.addEventListener(Event.CHANGE,
                            fromButton_change);

                var appControlBar:ApplicationControlBar;
                appControlBar = new ApplicationControlBar();
                appControlBar.dock = true;
                appControlBar.addChild(bccButton);
                appControlBar.addChild(fromButton);
                addChildAt(appControlBar, 0);

                sendButton = new Button();
                sendButton.label = "Send";
                sendButton.percentHeight = 100;

                fromComboBox = new ComboBox();
                fromComboBox.percentWidth = 100;

                fromFormItem = new FormItem();
                fromFormItem.label = "From:";
                fromFormItem.includeInLayout = fromButton.selected;
                fromFormItem.visible = fromButton.selected;
                fromFormItem.percentWidth = 100;
                fromFormItem.addChild(fromComboBox);

                toTextInput = new TextInput();
                toTextInput.percentWidth = 100;

                toFormItem = new FormItem();
                toFormItem.label = "To:";
                toFormItem.percentWidth = 100;
                toFormItem.addChild(toTextInput);

                ccTextInput = new TextInput();
                ccTextInput.percentWidth = 100;

                ccFormItem = new FormItem();
                ccFormItem.label = "CC:";
                ccFormItem.percentWidth = 100;
                ccFormItem.addChild(ccTextInput);

                bccTextInput = new TextInput();
                bccTextInput.percentWidth = 100;

                bccFormItem = new FormItem();
                bccFormItem.label = "BCC:";
                bccFormItem.percentWidth = 100;
                bccFormItem.addChild(bccTextInput);

                subjectTextInput = new TextInput();
                subjectTextInput.percentWidth = 100;

                subjectFormItem = new FormItem();
                subjectFormItem.label = "Subject:";
                subjectFormItem.percentWidth = 100;
                subjectFormItem.addChild(subjectTextInput);

                var form:Form = new Form();
                form.percentWidth = 100;
                form.addChild(fromFormItem);
                form.addChild(toFormItem);
                form.addChild(ccFormItem);
                form.addChild(bccFormItem);
                form.addChild(subjectFormItem);
                form.setStyle("indicatorGap", 0);
                form.setStyle("paddingLeft", 0);
                form.setStyle("paddingRight", 0);
                form.setStyle("paddingTop", 0);
                form.setStyle("paddingBottom", 0);

                var hBox:HBox = new HBox();
                hBox.percentWidth = 100;
                hBox.addChild(sendButton);
                hBox.addChild(form);
                addChild(hBox);

                bodyTextArea = new TextArea();
                bodyTextArea.percentWidth = 100;
                bodyTextArea.percentHeight = 100;
                addChild(bodyTextArea);
            }

            private function bccButton_change(evt:Event):void {
                bccFormItem.includeInLayout = bccButton.selected;
                bccFormItem.visible = bccButton.selected;
            }

            private function fromButton_change(evt:Event):void {
                fromFormItem.includeInLayout = fromButton.selected;
                fromFormItem.visible = fromButton.selected;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling form item visibility in a Form container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/',contentID: 'post-817',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'includeInLayout,visible',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/03/toggling-form-item-visibility-in-a-form-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing the label text alignment in a FormItem container in Flex</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 08:21:52 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[labelStyleName]]></category>
		<category><![CDATA[textAlign]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the text alignment on a Flex FormItem container&#8217;s label by setting the textAlign and labelStyleName styles.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_labelStyleName_textAlign_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/ --&#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.events.ListEvent; private function comboBox_change(evt:ListEvent):void { var cssObj:CSSStyleDeclaration [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the text alignment on a Flex FormItem container&#8217;s label by setting the <code>textAlign</code> and <code>labelStyleName</code> styles.</p>
<p>Full code after the jump.</p>
<p><span id="more-659"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_labelStyleName_textAlign_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/ --&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.events.ListEvent;

            private function comboBox_change(evt:ListEvent):void {
                var cssObj:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".customTextAlignLabel");
                cssObj.setStyle("textAlign", evt.currentTarget.selectedItem);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Style&gt;
        FormItem {
            labelStyleName: customTextAlignLabel;
        }

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

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="textAlign:"&gt;
                &lt;mx:ComboBox id="comboBox"
                        dataProvider="[left,center,right]"
                        change="comboBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="Button"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="ButtonBar"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="CheckBox"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="ColorPicker"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="ComboBox"&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_labelStyleName_textAlign_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_textAlign_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the label text alignment in a FormItem container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/',contentID: 'post-659',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'labelStyleName,textAlign',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/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Customizing a FormItem container&#8217;s label in Flex 3</title>
		<link>http://blog.flexexamples.com/2008/03/21/customizing-a-formitem-containers-label-in-flex-3/</link>
		<comments>http://blog.flexexamples.com/2008/03/21/customizing-a-formitem-containers-label-in-flex-3/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 14:36:27 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Label]]></category>
		<category><![CDATA[itemLabel]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/21/customizing-a-formitem-containers-label-in-flex-3/</guid>
		<description><![CDATA[<p>The following example shows how you can access the Label subcomponent in a Flex FormItem container and do fancy stuff like have form labels with hyperlinks or selectable text by using the itemLabel property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_itemLabel_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/21/customizing-a-formitem-containers-label-in-flex-3/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can access the Label subcomponent in a Flex FormItem container and do fancy stuff like have form labels with hyperlinks or selectable text by using the <code>itemLabel</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-569"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_itemLabel_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/21/customizing-a-formitem-containers-label-in-flex-3/ --&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.events.FlexEvent;
            import mx.controls.Label;
            import mx.controls.Alert;
            import mx.containers.FormItem;

            private function init2(evt:FlexEvent):void {
                var lbl:Label = FormItem(evt.currentTarget).itemLabel as Label;
                lbl.selectable = true;
            }

            private function init3(evt:FlexEvent):void {
                var lbl:Label = FormItem(evt.currentTarget).itemLabel as Label;
                lbl.htmlText = txt;
                lbl.selectable = true;
                lbl.addEventListener(TextEvent.LINK, label_link);
            }

            private function label_link(evt:TextEvent):void {
                Alert.show("You clicked a link. Have some cake.");
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:String id="txt"&gt;
        &lt;![CDATA[&lt;a href="event:att"&gt;&lt;u&gt;Hyperlink&lt;/u&gt;&lt;/a&gt; label]]&gt;
    &lt;/mx:String&gt;

    &lt;mx:Form maxWidth="500"&gt;
        &lt;mx:FormItem id="formItem1"
                label="Default label"&gt;
            &lt;mx:Label id="label1"
                    text="The quick brown fox jumped over the..." /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem id="formItem2"
                label="Selectable label"
                creationComplete="init2(event);"&gt;
            &lt;mx:Label id="label2"
                    text="The quick brown fox jumped over the..." /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem id="formItem3"
                label="Hyperlink label"
                creationComplete="init3(event);"&gt;
            &lt;mx:Label id="label3"
                    text="The quick brown fox jumped over the..." /&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_itemLabel_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_itemLabel_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Customizing a FormItem container\&#039;s label in Flex 3 on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/21/customizing-a-formitem-containers-label-in-flex-3/',contentID: 'post-569',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'itemLabel',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/03/21/customizing-a-formitem-containers-label-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Horizontally aligning items in a FormItem container in Flex</title>
		<link>http://blog.flexexamples.com/2008/03/18/horizontally-aligning-items-in-a-formitem-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/03/18/horizontally-aligning-items-in-a-formitem-container-in-flex/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 05:23:47 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[horizontalAlign]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/18/horizontally-aligning-items-in-a-formitem-container-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can align form items horizontally by setting the horizontalAlign style to &#8220;left&#8221;, &#8220;center&#8221;, or &#8220;right&#8221; on the Flex FormItem container.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_horizontalAlign_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/18/horizontally-aligning-form-items-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; Form { backgroundColor: white; backgroundAlpha: 0.2; borderColor: [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can align form items horizontally by setting the <code>horizontalAlign</code> style to &#8220;left&#8221;, &#8220;center&#8221;, or &#8220;right&#8221; on the Flex FormItem container.</p>
<p>Full code after the jump.</p>
<p><span id="more-565"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_horizontalAlign_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/18/horizontally-aligning-form-items-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        Form {
            backgroundColor: white;
            backgroundAlpha: 0.2;
            borderColor: black;
            borderStyle: solid;
            borderThickness: 1;
        }

        FormItem {
            labelStyleName: myFormItemLabelStyleName;
        }

        .myFormItemLabelStyleName {
            fontWeight: bold;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Form id="form" width="300"&gt;
        &lt;mx:FormItem label="left:"
                horizontalAlign="left"
                width="100%"&gt;
            &lt;mx:Image source="@Embed('assets/air_appicon-tn.gif')" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="center:"
                horizontalAlign="center"
                width="100%"&gt;
            &lt;mx:Image source="@Embed('assets/fl_appicon-tn.gif')" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="right:"
                horizontalAlign="right"
                width="100%"&gt;
            &lt;mx:Image source="@Embed('assets/fx_appicon-tn.gif')" /&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_horizontalAlign_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_horizontalAlign_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Horizontally aligning items in a FormItem container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/18/horizontally-aligning-items-in-a-formitem-container-in-flex/',contentID: 'post-565',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'horizontalAlign',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/03/18/horizontally-aligning-items-in-a-formitem-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Changing the layout direction of a form item in Flex</title>
		<link>http://blog.flexexamples.com/2008/03/18/changing-the-layout-direction-of-a-form-item-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/03/18/changing-the-layout-direction-of-a-form-item-in-flex/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 05:09:47 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[direction]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/18/changing-the-layout-direction-of-a-form-item-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can change the direction of a FormItem container in Flex by setting the direction property to &#8220;horizontal&#8221; or &#8220;vertical&#8221;.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_direction_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/18/changing-the-layout-direction-of-a-form-item-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; FormItem { labelStyleName: myFormItemLabelStyleName; } .myFormItemLabelStyleName { fontWeight: [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the direction of a FormItem container in Flex by setting the <code>direction</code> property to &#8220;horizontal&#8221; or &#8220;vertical&#8221;.</p>
<p>Full code after the jump.</p>
<p><span id="more-566"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_direction_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/18/changing-the-layout-direction-of-a-form-item-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        FormItem {
            labelStyleName: myFormItemLabelStyleName;
        }

        .myFormItemLabelStyleName {
            fontWeight: bold;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Form id="form"&gt;
        &lt;mx:FormItem label="horizontal:"
                direction="horizontal"&gt;
            &lt;mx:Image source="{Icons.AIR_ICON}"
                    toolTip="Adobe AIR" /&gt;
            &lt;mx:Image source="{Icons.FLASH_ICON}"
                    toolTip="Adobe Flash" /&gt;
            &lt;mx:Image source="{Icons.FLASH_PLAYER_ICON}"
                    toolTip="Adobe Flash Player" /&gt;
            &lt;mx:Image source="{Icons.FLEX_ICON}"
                    toolTip="Adobe Flex" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="vertical:"
                direction="vertical"&gt;
            &lt;mx:Image source="{Icons.AIR_ICON}"
                    toolTip="Adobe AIR" /&gt;
            &lt;mx:Image source="{Icons.FLASH_ICON}"
                    toolTip="Adobe Flash" /&gt;
            &lt;mx:Image source="{Icons.FLASH_PLAYER_ICON}"
                    toolTip="Adobe Flash Player" /&gt;
            &lt;mx:Image source="{Icons.FLEX_ICON}"
                    toolTip="Adobe Flex" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_direction_test/bin/srcview/source/Icons.as.html">/src/Icons.as</a></p>
<pre class="code">
/** http://blog.flexexamples.com/2008/03/18/changing-the-layout-direction-of-a-form-item-in-flex/ */
package {
    [Bindable]
    public class Icons {
        public function Icons() {
        }

        [Embed("assets/air_appicon-tn.gif")]
        public static var AIR_ICON:Class;

        [Embed("assets/fl_appicon-tn.gif")]
        public static var FLASH_ICON:Class;

        [Embed("assets/fl_player_appicon-tn.gif")]
        public static var FLASH_PLAYER_ICON:Class;

        [Embed("assets/fx_appicon-tn.gif")]
        public static var FLEX_ICON:Class;
    }
}
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_direction_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_direction_test/bin/main.html" width="100%" height="400"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the layout direction of a form item in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/18/changing-the-layout-direction-of-a-form-item-in-flex/',contentID: 'post-566',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'direction',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/03/18/changing-the-layout-direction-of-a-form-item-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting a custom required indicator skin on a FormItem container in Flex</title>
		<link>http://blog.flexexamples.com/2008/03/03/setting-a-custom-required-indicator-skin-on-a-formitem-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/03/03/setting-a-custom-required-indicator-skin-on-a-formitem-container-in-flex/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 02:27:33 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[indicatorGap]]></category>
		<category><![CDATA[indicatorSkin]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/03/setting-a-custom-required-indicator-skin-on-a-formitem-container-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set a custom indicator skin on a Flex FormItem container by setting the indicatorSkin style.</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_2/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/03/setting-a-custom-required-indicator-skin-on-a-formitem-container-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top" backgroundColor="white"&#62; &#60;mx:Style&#62; FormItem { indicatorGap: 24; } &#60;/mx:Style&#62; &#60;mx:Form&#62; &#60;mx:FormHeading label="Controls" /&#62; &#60;mx:FormItem [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set a custom indicator skin on a Flex FormItem container by setting the indicatorSkin style.</p>
<p>Full code after the jump.</p>
<p><span id="more-448"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_indicatorSkin_test_2/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/03/setting-a-custom-required-indicator-skin-on-a-formitem-container-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        FormItem {
            indicatorGap: 24;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormHeading label="Controls" /&gt;
        &lt;mx:FormItem label="Button:"
                required="true"
                indicatorSkin="@Embed('assets/Button.png')"&gt;
            &lt;mx:Label text="Lorem ipsum..." /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="ButtonBar:"
                required="true"
                indicatorSkin="@Embed('assets/ButtonBar.png')"&gt;
            &lt;mx:Label text="Lorem ipsum..." /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="CheckBox:"
                required="true"
                indicatorSkin="@Embed('assets/CheckBox.png')"&gt;
            &lt;mx:Label text="Lorem ipsum..." /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="ColorPicker:"
                required="true"
                indicatorSkin="@Embed('assets/ColorPicker.png')"&gt;
            &lt;mx:Label text="Lorem ipsum..." /&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_2/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_2/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting a custom required indicator skin on a FormItem container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/03/setting-a-custom-required-indicator-skin-on-a-formitem-container-in-flex/',contentID: 'post-448',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/2008/03/03/setting-a-custom-required-indicator-skin-on-a-formitem-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<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>Setting the gap around the required indicator in a Flex form</title>
		<link>http://blog.flexexamples.com/2007/11/06/setting-the-gap-around-the-required-indicator-in-a-flex-form/</link>
		<comments>http://blog.flexexamples.com/2007/11/06/setting-the-gap-around-the-required-indicator-in-a-flex-form/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 04:33:08 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[indicatorGap]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/06/setting-the-gap-around-the-required-indicator-in-a-flex-form/</guid>
		<description><![CDATA[<p>The following example shows how you can set the gap around the required indicator in a Flex form by setting the indicatorGap style, as seen in the following snippet:</p> &#60;mx:Style&#62; FormItem { indicatorGap: 24; } &#60;/mx:Style&#62; <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_indicatorGap_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/11/06/setting-the-gap-around-the-required-indicator-in-a-flex-form/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the gap around the required indicator in a Flex form by setting the <code>indicatorGap</code> style, as seen in the following snippet:</p>
<pre class="code">
&lt;mx:Style&gt;
    FormItem {
        indicatorGap: 24;
    }
&lt;/mx:Style&gt;
</pre>
<p>Full code after the jump.</p>
<p><span id="more-279"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_indicatorGap_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/06/setting-the-gap-around-the-required-indicator-in-a-flex-form/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        creationComplete="init();"&gt;

    &lt;mx:Style&gt;
        FormItem {
            backgroundColor: haloSilver;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private var indicatorGapStyle:CSSStyleDeclaration;

            private function init():void {
                indicatorGapStyle = StyleManager.getStyleDeclaration("FormItem");
            }

            private function slider_change(evt:SliderEvent):void {
                indicatorGapStyle.setStyle("indicatorGap", evt.value);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Label text="indicatorGap:" /&gt;
        &lt;mx:HSlider id="slider"
                minimum="14"
                maximum="100"
                value="14"
                snapInterval="1"
                liveDragging="true"
                dataTipPlacement="bottom"
                dataTipPrecision="0"
                change="slider_change(event);" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="Lorem ipsum:"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="The quick brown fox jumped:" required="true"&gt;
            &lt;mx:TextInput /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="over the lazy dog:" required="true"&gt;
            &lt;mx:Text text="The quick brown fox jumped over the lazy dog." /&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_indicatorGap_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_indicatorGap_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the gap around the required indicator in a Flex form on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/06/setting-the-gap-around-the-required-indicator-in-a-flex-form/',contentID: 'post-279',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'indicatorGap',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/06/setting-the-gap-around-the-required-indicator-in-a-flex-form/feed/</wfw:commentRss>
		<slash:comments>2</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>

