<?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; focusThickness</title>
	<atom:link href="http://blog.flexexamples.com/tag/focusthickness/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 focus blend mode on a TextArea control in Flex</title>
		<link>http://blog.flexexamples.com/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 07:18:21 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TextArea]]></category>
		<category><![CDATA[blendMode]]></category>
		<category><![CDATA[focusBlendMode]]></category>
		<category><![CDATA[focusThickness]]></category>
		<category><![CDATA[setFocus()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the focus blend mode of the focus rectangle on a Flex TextArea control by setting the focusBlendMode style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_focusBlendMode_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/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/ --&#62; &#60;mx:Application name="TextArea_focusBlendMode_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle"&#62; &#60;mx:ApplicationControlBar dock="true" styleName="plain"&#62; &#60;mx:Form styleName="plain"&#62; &#60;mx:FormItem label="focusThickness:"&#62; &#60;mx:HSlider [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the focus blend mode of the focus rectangle on a Flex TextArea control by setting the <code>focusBlendMode</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-934"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_focusBlendMode_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/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/ --&gt;
&lt;mx:Application name="TextArea_focusBlendMode_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"&gt;

    &lt;mx:ApplicationControlBar dock="true" styleName="plain"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="focusThickness:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="24"
                        value="10"
                        snapInterval="1"
                        tickInterval="1"
                        change="textArea.setFocus();" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="focusBlendMode:"&gt;
                &lt;mx:ComboBox id="comboBox"
                        selectedIndex="10"
                        change="textArea.setFocus();"&gt;
                    &lt;mx:dataProvider&gt;
                        &lt;mx:Array&gt;
                            &lt;mx:String&gt;{BlendMode.ADD}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.ALPHA}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.DARKEN}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.DIFFERENCE}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.ERASE}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.HARDLIGHT}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.INVERT}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.LAYER}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.LIGHTEN}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.MULTIPLY}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.NORMAL}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.OVERLAY}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.SCREEN}&lt;/mx:String&gt;
                            &lt;!--
                            &lt;mx:String&gt;{BlendMode.SHADER}&lt;/mx:String&gt;
                            --&gt;
                            &lt;mx:String&gt;{BlendMode.SUBTRACT}&lt;/mx:String&gt;
                        &lt;/mx:Array&gt;
                    &lt;/mx:dataProvider&gt;
                &lt;/mx:ComboBox&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TextArea id="textArea"
            text="The quick brown fox jumps over the lazy dog."
            focusThickness="{slider.value}"
            focusBlendMode="{comboBox.selectedItem}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_focusBlendMode_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TextArea_focusBlendMode_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>focusBlendMode</code> style in an external .CSS file or &lt;Style&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_focusBlendMode_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/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/ --&gt;
&lt;mx:Application name="TextArea_focusBlendMode_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"&gt;

    &lt;mx:Style&gt;
        TextArea {
            focusThickness: 20;
            focusBlendMode: difference;
        }
    &lt;/mx:Style&gt;

    &lt;mx:TextArea id="textArea"
            text="The quick brown fox jumps over the lazy dog."  /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>focusBlendMode</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_focusBlendMode_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/ --&gt;
&lt;mx:Application name="TextArea_focusBlendMode_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"&gt;

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

            private function slider_change(evt:SliderEvent):void {
                textArea.setStyle("focusThickness", evt.value);
                textArea.setFocus();
            }

            private function comboBox_change(evt:ListEvent):void {
                textArea.setStyle("focusBlendMode", comboBox.selectedItem);
                textArea.setFocus();
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true" styleName="plain"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="focusThickness:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="24"
                        value="10"
                        snapInterval="1"
                        tickInterval="1"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="focusBlendMode:"&gt;
                &lt;mx:ComboBox id="comboBox"
                        selectedIndex="10"
                        change="comboBox_change(event);"&gt;
                    &lt;mx:dataProvider&gt;
                        &lt;mx:Array&gt;
                            &lt;mx:String&gt;{BlendMode.ADD}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.ALPHA}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.DARKEN}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.DIFFERENCE}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.ERASE}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.HARDLIGHT}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.INVERT}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.LAYER}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.LIGHTEN}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.MULTIPLY}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.NORMAL}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.OVERLAY}&lt;/mx:String&gt;
                            &lt;mx:String&gt;{BlendMode.SCREEN}&lt;/mx:String&gt;
                            &lt;!--
                            &lt;mx:String&gt;{BlendMode.SHADER}&lt;/mx:String&gt;
                            --&gt;
                            &lt;mx:String&gt;{BlendMode.SUBTRACT}&lt;/mx:String&gt;
                        &lt;/mx:Array&gt;
                    &lt;/mx:dataProvider&gt;
                &lt;/mx:ComboBox&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TextArea id="textArea"
            text="The quick brown fox jumps over the lazy dog." /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the focus blend mode on a TextArea control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/',contentID: 'post-934',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'blendMode,focusBlendMode,focusThickness,setFocus()',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/01/11/setting-the-focus-blend-mode-on-a-textarea-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Rounding specific corners on a focus rectangle in the TextInput control in Flex</title>
		<link>http://blog.flexexamples.com/2008/06/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/06/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-in-flex/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 05:52:52 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TextInput]]></category>
		<category><![CDATA[cornerRadius]]></category>
		<category><![CDATA[focusRoundedCorners]]></category>
		<category><![CDATA[focusThickness]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can apply a corner radius to specific corners of a Flex TextInput control&#8217;s focus rectangle by setting the focusRoundedCorners style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_focusRoundedCorners_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/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-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[ private function checkBox_change(evt:Event):void { var corners:Array [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can apply a corner radius to specific corners of a Flex TextInput control&#8217;s focus rectangle by setting the <code>focusRoundedCorners</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-667"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_focusRoundedCorners_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/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-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[
            private function checkBox_change(evt:Event):void {
                var corners:Array = [];
                if (tLeft.selected) {
                    corners.push("tl");
                }
                if (tRight.selected) {
                    corners.push("tr");
                }
                if (bLeft.selected) {
                    corners.push("bl");
                }
                if (bRight.selected) {
                    corners.push("br");
                }
                var str:String = corners.join(" ");
                textInput.setStyle("focusRoundedCorners", str);
                focusManager.setFocus(textInput);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="top left (tl):"&gt;
                &lt;mx:CheckBox id="tLeft"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="top right (tr):"&gt;
                &lt;mx:CheckBox id="tRight"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="bottom left (bl):"&gt;
                &lt;mx:CheckBox id="bLeft"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="top right (br):"&gt;
                &lt;mx:CheckBox id="bRight"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TextInput id="textInput"
            focusThickness="10"
            cornerRadius="10" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_focusRoundedCorners_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/TextInput_focusRoundedCorners_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>focusRoundedCorners</code> style in MXML, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_focusRoundedCorners_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/06/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:TextInput id="textInput"
            focusThickness="10"
            cornerRadius="10"
            focusRoundedCorners="tl br" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>focusRoundedCorners</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextInput_focusRoundedCorners_test/bin/srcview/source/main3.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/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-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;
        TextInput {
            focusRoundedCorners: "tl br";
        }
    &lt;/mx:Style&gt;

    &lt;mx:TextInput id="textInput"
            focusThickness="10"
            cornerRadius="10" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Rounding specific corners on a focus rectangle in the TextInput control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/06/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-in-flex/',contentID: 'post-667',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'cornerRadius,focusRoundedCorners,focusThickness',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/12/rounding-specific-corners-on-a-focus-rectangle-in-the-textinput-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting the focus thickness on a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Sun, 25 May 2008 02:29:18 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[focusThickness]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/">&#8220;Setting the focus alpha on a NumericStepper control in Flex&#8221;</a>, we saw how you could set the alpha of the focus rectangle for a Flex NumericStepper control by setting the focusAlpha style.</p> <p>The following example shows how you can set the focus thickness of the focus rectangle by setting the [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/">&#8220;Setting the focus alpha on a NumericStepper control in Flex&#8221;</a>, we saw how you could set the alpha of the focus rectangle for a Flex NumericStepper control by setting the <code>focusAlpha</code> style.</p>
<p>The following example shows how you can set the focus thickness of the focus rectangle by setting the <code>focusThickness</code> style on the Flex NumericStepper control.</p>
<p>Full code after the jump.</p>
<p><span id="more-642"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_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/05/24/setting-the-focus-thickness-on-a-numericstepper-control-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.NumericStepperEvent;

            private function numericStepper_change(evt:NumericStepperEvent):void {
                // reset focus rect
                focusManager.setFocus(btn);
                focusManager.setFocus(numericStepper);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn"
                label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="focusThickness:"&gt;
            &lt;mx:NumericStepper id="numericStepper"
                    minimum="0"
                    maximum="10"
                    focusThickness="{numericStepper.value}"
                    change="numericStepper_change(event);" /&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/NumericStepper_focusThickness_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/NumericStepper_focusThickness_test/bin/main.html" width="100%" height="150"></iframe></p>
<p>You can also set the <code>focusThickness</code> style using an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-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;
        NumericStepper {
            focusThickness: 10;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn"
                label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="focusThickness:"&gt;
            &lt;mx:NumericStepper id="numericStepper"
                    minimum="0"
                    maximum="10" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>focusThickness</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_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/05/24/setting-the-focus-thickness-on-a-numericstepper-control-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.NumericStepperEvent;

            private function numericStepper_change(evt:NumericStepperEvent):void {
                numericStepper.setStyle("focusThickness", evt.value);
                // reset focus rect
                focusManager.setFocus(btn);
                focusManager.setFocus(numericStepper);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn"
                label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="focusThickness:"&gt;
            &lt;mx:NumericStepper id="numericStepper"
                    minimum="0"
                    maximum="10"
                    change="numericStepper_change(event);" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the focus thickness on a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/',contentID: 'post-642',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'focusThickness',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/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

