<?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; labelStyleName</title>
	<atom:link href="http://blog.flexexamples.com/tag/labelstylename/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>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>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>Styling the HSlider control using CSS</title>
		<link>http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/</link>
		<comments>http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 07:22:22 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HSlider]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[VSlider]]></category>
		<category><![CDATA[@font face]]></category>
		<category><![CDATA[dataTipOffset]]></category>
		<category><![CDATA[dataTipPlacement]]></category>
		<category><![CDATA[dataTipPrecision]]></category>
		<category><![CDATA[dataTipStyleName]]></category>
		<category><![CDATA[labelStyleName]]></category>
		<category><![CDATA[styleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/</guid>
		<description><![CDATA[<p>The following example shows how you can style a HSlider (or VSlider) control in Flex using Cascading Style Sheets (CSS).</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HSlider_styleName_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; @font-face{ src: url("./fonts/arial.ttf"); fontFamily: "ArialEmbedded"; } .MyLabel { fontFamily: ArialEmbedded; fontSize: 15; fontWeight: [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can style a HSlider (or VSlider) control in Flex using Cascading Style Sheets (CSS).</p>
<p>Full code after the jump.</p>
<p><span id="more-171"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HSlider_styleName_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/09/12/styling-the-hslider-control-using-css/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        @font-face{
            src: url("./fonts/arial.ttf");
            fontFamily: "ArialEmbedded";
        }

        .MyLabel {
            fontFamily: ArialEmbedded;
            fontSize: 15;
            fontWeight: normal;
        }

        .MyDataTip {
            backgroundAlpha: 1.0;
            backgroundColor: haloBlue;
            color: white;
            cornerRadius: 10;
            fontWeight: bold;
            letterSpacing: 1;
        }

        .MySlider {
            dataTipOffset: 0;
            dataTipPrecision: 0;
            dataTipPlacement: left;
            dataTipStyleName: MyDataTip;
            showTrackHighlight: true;
            labelStyleName: MyLabel;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Array id="labelArr"&gt;
        &lt;mx:Number&gt;-10&lt;/mx:Number&gt;
        &lt;mx:Number&gt;0&lt;/mx:Number&gt;
        &lt;mx:Number&gt;10&lt;/mx:Number&gt;
        &lt;mx:Number&gt;20&lt;/mx:Number&gt;
    &lt;/mx:Array&gt;

    &lt;mx:HSlider id="slider"
            minimum="-10"
            maximum="20"
            labels="{labelArr}"
            snapInterval="1"
            tickInterval="10"
            styleName="MySlider" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HSlider_styleName_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/HSlider_styleName_test/bin/main.html" width="100%" height="150"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Styling the HSlider control using CSS on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/',contentID: 'post-171',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '@font face,dataTipOffset,dataTipPlacement,dataTipPrecision,dataTipStyleName,labelStyleName,styleName',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/09/12/styling-the-hslider-control-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

