<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Changing the label text alignment in a FormItem container in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 13 Feb 2012 01:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: An</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-7031</link>
		<dc:creator>An</dc:creator>
		<pubDate>Wed, 17 Feb 2010 08:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-7031</guid>
		<description>For every FormItem add :  styeName=customTextAlignLabel

example:


 </description>
		<content:encoded><![CDATA[<p>For every FormItem add :  styeName=customTextAlignLabel</p>
<p>example:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeeshan</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-6806</link>
		<dc:creator>Zeeshan</dc:creator>
		<pubDate>Wed, 20 Jan 2010 16:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-6806</guid>
		<description>i guess it&#039;s because I was adding a Label component to the formItem first.   Can you provide detail on how to make it work on TitleWindow?

- Zeeshan</description>
		<content:encoded><![CDATA[<p>i guess it&#8217;s because I was adding a Label component to the formItem first.   Can you provide detail on how to make it work on TitleWindow?</p>
<p>- Zeeshan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeeshan</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-6805</link>
		<dc:creator>Zeeshan</dc:creator>
		<pubDate>Wed, 20 Jan 2010 16:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-6805</guid>
		<description>If you make a FormItem required=&quot;true&quot;, the &quot;*&quot; appears even before the label which looks ugly. Not sure how to overcome this.
 - zeeshan</description>
		<content:encoded><![CDATA[<p>If you make a FormItem required=&#8221;true&#8221;, the &#8220;*&#8221; appears even before the label which looks ugly. Not sure how to overcome this.<br />
 &#8211; zeeshan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-5653</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Wed, 09 Sep 2009 15:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-5653</guid>
		<description>@Marco,

Works for me:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&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=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ListEvent;

            private function comboBox_change(evt:ListEvent):void {
                var cssObj:CSSStyleDeclaration = StyleManager.getStyleDeclaration(&quot;.customTextAlignLabel&quot;);
                cssObj.setStyle(&quot;textAlign&quot;, 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=&quot;true&quot;&gt;
        &lt;mx:Form styleName=&quot;plain&quot;&gt;
            &lt;mx:FormItem label=&quot;textAlign:&quot;&gt;
                &lt;mx:ComboBox id=&quot;comboBox&quot;
                        dataProvider=&quot;[left,center,right]&quot;
                        change=&quot;comboBox_change(event);&quot; /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TitleWindow&gt;
        &lt;mx:Form&gt;
            &lt;mx:FormItem label=&quot;Button&quot;&gt;
                &lt;mx:TextInput /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label=&quot;ButtonBar&quot;&gt;
                &lt;mx:TextInput /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label=&quot;CheckBox&quot;&gt;
                &lt;mx:TextInput /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label=&quot;ColorPicker&quot;&gt;
                &lt;mx:TextInput /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label=&quot;ComboBox&quot;&gt;
                &lt;mx:TextInput /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:TitleWindow&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Marco,</p>
<p>Works for me:</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> encoding=<span style="color: #ff0000;">&quot;utf-8&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/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> 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.ListEvent;</span>
&nbsp;
<span style="color: #339933;">            private function comboBox_change(evt:ListEvent):void {</span>
<span style="color: #339933;">                var cssObj:CSSStyleDeclaration = StyleManager.getStyleDeclaration(&quot;.customTextAlignLabel&quot;);</span>
<span style="color: #339933;">                cssObj.setStyle(&quot;textAlign&quot;, evt.currentTarget.selectedItem);</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:Style</span><span style="color: #7400FF;">&gt;</span></span>
        FormItem {
            labelStyleName: customTextAlignLabel;
        }
&nbsp;
        .customTextAlignLabel {
            textAlign: left;
        }
    <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: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;textAlign:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ComboBox</span> id=<span style="color: #ff0000;">&quot;comboBox&quot;</span></span>
<span style="color: #000000;">                        dataProvider=<span style="color: #ff0000;">&quot;[left,center,right]&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;comboBox_change(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:TitleWindow</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:FormItem</span> label=<span style="color: #ff0000;">&quot;Button&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</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;ButtonBar&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</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;CheckBox&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</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;ColorPicker&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</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;ComboBox&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</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:TitleWindow</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>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-5649</link>
		<dc:creator>Marco</dc:creator>
		<pubDate>Wed, 09 Sep 2009 12:21:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-5649</guid>
		<description>doesn&#039;t work inside a TitleWindow... and i can understand why!</description>
		<content:encoded><![CDATA[<p>doesn&#8217;t work inside a TitleWindow&#8230; and i can understand why!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-3349</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Thu, 12 Mar 2009 15:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-3349</guid>
		<description>Pirkka Rannikko,

Can you please file an enhancement request for both issues at http://bugs.adobe.com/flex/ ?

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p>Pirkka Rannikko,</p>
<p>Can you please file an enhancement request for both issues at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a> ?</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pirkka Rannikko</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-3351</link>
		<dc:creator>Pirkka Rannikko</dc:creator>
		<pubDate>Thu, 12 Mar 2009 09:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-3351</guid>
		<description>Hi and thanks for the tip!

Can the alignment of the FormHeading component be changed also and is there an easy way to position the labels above the form fields with the mxml used here? If not, I can&#039;t possibly understand why this kind of basic but yet very critical thing haven&#039;t been taken care of in Flex 3 :(

In HTML labels and form fields can be tied together semantically by making a reference to the ID attribute of the form field element using the FOR attribute of the label element. When this is done the label can be clicked and the associated field gets focus. How could this be achieved in Flex 3?</description>
		<content:encoded><![CDATA[<p>Hi and thanks for the tip!</p>
<p>Can the alignment of the FormHeading component be changed also and is there an easy way to position the labels above the form fields with the mxml used here? If not, I can&#8217;t possibly understand why this kind of basic but yet very critical thing haven&#8217;t been taken care of in Flex 3 :(</p>
<p>In HTML labels and form fields can be tied together semantically by making a reference to the ID attribute of the form field element using the FOR attribute of the label element. When this is done the label can be clicked and the associated field gets focus. How could this be achieved in Flex 3?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chandra Kumar</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-3350</link>
		<dc:creator>Chandra Kumar</dc:creator>
		<pubDate>Tue, 23 Sep 2008 03:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-3350</guid>
		<description>After reading this example, I see that a Form tag can be placed inside ApplicationControlBar tag. I learnt one more way of populating a ComboBox with the way you have used the dataProvider property.</description>
		<content:encoded><![CDATA[<p>After reading this example, I see that a Form tag can be placed inside ApplicationControlBar tag. I learnt one more way of populating a ComboBox with the way you have used the dataProvider property.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steven</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-3347</link>
		<dc:creator>steven</dc:creator>
		<pubDate>Wed, 11 Jun 2008 19:13:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-3347</guid>
		<description>hi also like your blog , u can also visit this blog http://flexsamples.blogspot.com

thanks
St.</description>
		<content:encoded><![CDATA[<p>hi also like your blog , u can also visit this blog <a href="http://flexsamples.blogspot.com" rel="nofollow">http://flexsamples.blogspot.com</a></p>
<p>thanks<br />
St.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernanda Gomez</title>
		<link>http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/comment-page-1/#comment-3348</link>
		<dc:creator>Fernanda Gomez</dc:creator>
		<pubDate>Sun, 08 Jun 2008 05:32:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/06/changing-the-label-text-alignment-in-a-formitem-container-in-flex/#comment-3348</guid>
		<description>Thanks for sharing, I love your blog.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing, I love your blog.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

