<?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; decrementButton</title>
	<atom:link href="http://blog.flexexamples.com/tag/decrementbutton/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 base color on the Spark HScrollBar control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 14:44:40 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[HScrollBar (Spark)]]></category>
		<category><![CDATA[#thumb]]></category>
		<category><![CDATA[#track]]></category>
		<category><![CDATA[baseColor]]></category>
		<category><![CDATA[decrementButton]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[incrementButton.]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can style the base color on the Flex 4 Spark HScrollBar control’s thumb, track, increment button, and/or decrement button by setting the baseColor style.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/ --&#62; &#60;s:Application name=&#34;Spark_HScrollBar_baseColor_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/halo&#34;&#62; &#60;s:controlBarContent&#62; &#60;mx:Form&#62; &#60;mx:FormItem label=&#34;baseColor:&#34;&#62; &#60;mx:ColorPicker id=&#34;colorPicker&#34; selectedColor=&#34;#CCCCCC&#34; /&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can style the base color on the Flex 4 Spark HScrollBar control’s thumb, track, increment button, and/or decrement button by setting the <code>baseColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-1003"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_HScrollBar_baseColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</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;baseColor:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;colorPicker&quot;</span></span>
<span style="color: #000000;">                        selectedColor=<span style="color: #ff0000;">&quot;#CCCCCC&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;/s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VGroup</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HScrollBar</span> id=<span style="color: #ff0000;">&quot;scrollBar&quot;</span></span>
<span style="color: #000000;">                baseColor=<span style="color: #ff0000;">&quot;{colorPicker.selectedColor}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:VGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_HScrollBar_baseColor_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_HScrollBar_baseColor_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>baseColor</code> style 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> 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/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_HScrollBar_baseColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
&nbsp;
        s|HScrollBar {
            baseColor: haloBlue;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VGroup</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HScrollBar</span> id=<span style="color: #ff0000;">&quot;scrollBar&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:VGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Or, you can set the <code>baseColor</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> 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/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_HScrollBar_baseColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</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;baseColor:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;colorPicker&quot;</span></span>
<span style="color: #000000;">                        selectedColor=<span style="color: #ff0000;">&quot;#CCCCCC&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;colorPicker_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;/s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            import mx.events.ColorPickerEvent;</span>
&nbsp;
<span style="color: #000000;">            protected function colorPicker_change<span style="color: #66cc66;">&#40;</span>evt:ColorPickerEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">               scrollBar.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;baseColor&quot;</span>, evt.color<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VGroup</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HScrollBar</span> id=<span style="color: #ff0000;">&quot;scrollBar&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:VGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Finally, if you wanted to set the <code>baseColor</code> style on the Spark HScrollBar thumb, track, increment button, and/or decrement button individually, you could either create a custom Spark HScrollBar skin and set the <code>baseColor</code> styles in the new skin, or you could style the <code>#thumb</code>, <code>#track</code>, <code>#incrementButton</code>, and/or <code>#decrementButton</code> selectors directly, 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> 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/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_HScrollBar_baseColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
&nbsp;
        s|HScrollBar #decrementButton {
            baseColor: red;
        }
        s|HScrollBar #incrementButton {
            baseColor: haloGreen;
        }
        s|HScrollBar #track {
            baseColor: haloBlue;
        }
        s|HScrollBar #thumb {
            baseColor: haloOrange;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VGroup</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HScrollBar</span> id=<span style="color: #ff0000;">&quot;scrollBar&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:VGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_HScrollBar_baseColor_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_HScrollBar_baseColor_test/bin/main4.html" width="100%" height="100"></iframe></p>
<p>Due to popular request, here is the &#8220;same&#8221; example in a more ActionScript-friendly format:</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/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_HScrollBar_baseColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span></span>
<span style="color: #000000;">        initialize=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            import spark.components.HScrollBar;</span>
<span style="color: #000000;">            import spark.components.VGroup;</span>
&nbsp;
<span style="color: #000000;">            private const scrollBar:HScrollBar = new HScrollBar<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">            private function init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                var cssObj:CSSStyleDeclaration = StyleManager.getStyleDeclaration<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.HScrollBar&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                cssObj.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;baseColor&quot;</span>, <span style="color: #ff0000;">&quot;haloBlue&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">                var vGr:VGroup = new VGroup<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                vGr.horizontalCenter = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                vGr.verticalCenter = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                vGr.addElement<span style="color: #66cc66;">&#40;</span>scrollBar<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                addElement<span style="color: #66cc66;">&#40;</span>vGr<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the base color on the Spark HScrollBar control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/',contentID: 'post-1003',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '#thumb,#track,baseColor,decrementButton,Gumbo,incrementButton.',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/03/14/setting-the-base-color-on-the-fxhscrollbar-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Setting the repeat interval on the Spark NumericStepper control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 06:40:57 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Flex4]]></category>
		<category><![CDATA[NumericStepper (Spark)]]></category>
		<category><![CDATA[decrementButton]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[incrementButton.]]></category>
		<category><![CDATA[repeatInterval]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can set the button repeat interval on a Spark NumericStepper control in Flex 4 by setting the repeatInterval style on the nested increment button and decrement button.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/ --&#62; &#60;s:Application name=&#34;Spark_NumericStepper_repeatInterval_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#160; &#60;fx:Style&#62; @namespace s &#34;library://ns.adobe.com/flex/spark&#34;; @namespace mx &#34;library://ns.adobe.com/flex/mx&#34;; &#160; s&#124;NumericStepper [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the button repeat interval on a Spark NumericStepper control in Flex 4 by setting the <code>repeatInterval</code> style on the nested increment button and decrement button.</p>
<p><span id="more-987"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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/2009/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_NumericStepper_repeatInterval_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
        @namespace mx &quot;library://ns.adobe.com/flex/mx&quot;;
&nbsp;
        s|NumericStepper #incrementButton,
        s|NumericStepper #decrementButton {
            repeatInterval: 500;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:NumericStepper</span> id=<span style="color: #ff0000;">&quot;numericStepper&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_NumericStepper_repeatInterval_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_NumericStepper_repeatInterval_test/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>repeatInterval</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> 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/2009/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_NumericStepper_repeatInterval_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            protected function init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                numericStepper.incrementButton.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;repeatInterval&quot;</span>, <span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                numericStepper.decrementButton.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;repeatInterval&quot;</span>, <span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:NumericStepper</span> id=<span style="color: #ff0000;">&quot;numericStepper&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            initialize=<span style="color: #ff0000;">&quot;init();&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the repeat interval on the Spark NumericStepper control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/',contentID: 'post-987',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'decrementButton,Gumbo,incrementButton.,repeatInterval',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/03/02/setting-the-repeat-interval-on-an-fxnumericstepper-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Styling the decrement button and increment button on a Spark VScrollBar control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxvscrollbar-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxvscrollbar-control-in-flex-gumbo/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 15:19:07 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[TextArea (Spark)]]></category>
		<category><![CDATA[VScrollBar (Spark)]]></category>
		<category><![CDATA[decrementButton]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[incrementButton.]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxvscrollbar-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can use advanced CSS to style the decrement and decrement buttons on a Spark TextArea control&#8217;s vertical scroll bar in Flex 4 by styling the #decrementButton and #incrementButton selectors.</p> <p>Full code after the jump.</p> <p></p> <p class="alert">To use the following code, you must have Flash Player 10 and a [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can use advanced CSS to style the decrement and decrement buttons on a Spark TextArea control&#8217;s vertical scroll bar in Flex 4 by styling the #decrementButton and #incrementButton selectors.</p>
<p>Full code after the jump.</p>
<p><span id="more-983"></span></p>
<p class="alert">To use the following code, you must have Flash Player 10 and a Flex 4 SDK installed in your Flex Builder 3. For more information on downloading and installing the Flex 4 SDK into Flex Builder 3, see <a href="http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-flex-builder-3/">&#8220;Using the beta 4 SDK in Flex Builder 3&#8243;</a>.</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxvscrollbar-control-in-flex-gumbo/ --&gt;
&lt;s:Application name="Spark_TextArea_VScrollBar_decrementButton_test"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo"&gt;

    &lt;fx:Style&gt;
        @namespace s "library://ns.adobe.com/flex/spark";

        s|TextArea s|VScrollBar #decrementButton {
            baseColor: #FF0000;
        }

        s|TextArea s|VScrollBar #incrementButton {
            baseColor: haloGreen;
        }
    &lt;/fx:Style&gt;

    &lt;s:TextArea id="textArea"
            text="The quick brown fox jumps over the lazy dog."
            verticalScrollPolicy="on"
            horizontalScrollPolicy="on"
            horizontalCenter="0"
            verticalCenter="0" /&gt;

&lt;/s:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_TextArea_VScrollBar_decrementButton_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_TextArea_VScrollBar_decrementButton_test/bin/main.html" width="100%" height="200"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Styling the decrement button and increment button on a Spark VScrollBar control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxvscrollbar-control-in-flex-gumbo/',contentID: 'post-983',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'decrementButton,Gumbo,incrementButton.',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/02/27/styling-the-decrement-button-and-increment-button-on-an-fxvscrollbar-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Styling the decrement button and increment button on a Spark Spinner control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxspinner-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxspinner-control-in-flex-gumbo/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 08:04:11 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[Spinner (Spark)]]></category>
		<category><![CDATA[decrementButton]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[incrementButton.]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxspinner-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can use advanced CSS to style the decrement and decrement buttons on a Spark Spinner control&#8217;s vertical scroll bar in Flex 4 by styling the #decrementButton and #incrementButton selectors.</p> <p>Full code after the jump.</p> <p></p> <p class="alert">To use the following code, you must have Flash Player 10 and a [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can use advanced CSS to style the decrement and decrement buttons on a Spark Spinner control&#8217;s vertical scroll bar in Flex 4 by styling the #decrementButton and #incrementButton selectors.</p>
<p>Full code after the jump.</p>
<p><span id="more-984"></span></p>
<p class="alert">To use the following code, you must have Flash Player 10 and a Flex 4 SDK installed in your Flex Builder 3. For more information on downloading and installing the Flex 4 SDK into Flex Builder 3, see <a href="http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-flex-builder-3/">&#8220;Using the beta Flex 4 SDK in Flex Builder 3&#8243;</a>.</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxspinner-control-in-flex-gumbo/ --&gt;
&lt;s:Application name="Spark_Spinner_decrementButton_test"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo"&gt;

    &lt;fx:Style&gt;
        @namespace mx "library://ns.adobe.com/flex/halo";
        @namespace s "library://ns.adobe.com/flex/spark";

        s|Spinner #incrementButton {
            baseColor: haloGreen;
        }
        s|Spinner #decrementButton {
            baseColor: red;
        }
    &lt;/fx:Style&gt;

    &lt;s:HGroup id="group"
            horizontalCenter="0"
            verticalCenter="0"&gt;
        &lt;s:SimpleText id="simpleTxt"
                text="{spinner.value}"
                textAlign="center"
                verticalAlign="middle"
                width="30"
                height="100%"  /&gt;
        &lt;s:Spinner id="spinner" /&gt;
    &lt;/s:HGroup&gt;

&lt;/s:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_Spinner_decrementButton_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_Spinner_decrementButton_test/bin/main.html" width="100%" height="100"></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="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxspinner-control-in-flex-gumbo/ --&gt;
&lt;s:Application name="Spark_Spinner_decrementButton_test"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo"
        initialize="init();"&gt;

    &lt;fx:Script&gt;
        &lt;![CDATA[
            import mx.events.FlexEvent;
            import spark.components.HGroup;
            import flashx.textLayout.formats.VerticalAlign;
            import flashx.textLayout.formats.TextAlign;
            import spark.components.Spinner;
            import spark.primitives.SimpleText;

            private var simpleTxt:SimpleText;
            private var spinner:Spinner;

            private function init():void {
                simpleTxt = new SimpleText();
                simpleTxt.text = "0";
                simpleTxt.setStyle("textAlign", TextAlign.CENTER);
                simpleTxt.setStyle("verticalAlign", VerticalAlign.MIDDLE);
                simpleTxt.width = 30;
                simpleTxt.percentHeight = 100;

                spinner = new Spinner();
                spinner.addEventListener(FlexEvent.INITIALIZE, spinner_init);
                spinner.addEventListener(Event.CHANGE, spinner_change);

                var group:HGroup = new HGroup();
                group.horizontalCenter = 0;
                group.verticalCenter = 0;
                group.addElement(simpleTxt);
                group.addElement(spinner);
                addElement(group);
            }

            private function spinner_init(evt:FlexEvent):void {
                spinner.incrementButton.setStyle("baseColor", "haloGreen");
                spinner.decrementButton.setStyle("baseColor", "red");
            }

            private function spinner_change(evt:Event):void {
                simpleTxt.text = spinner.value.toString();
            }
        ]]&gt;
    &lt;/fx:Script&gt;

&lt;/s:Application&gt;
</pre>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Styling the decrement button and increment button on a Spark Spinner control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/02/27/styling-the-decrement-button-and-increment-button-on-an-fxspinner-control-in-flex-gumbo/',contentID: 'post-984',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'decrementButton,Gumbo,incrementButton.',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/02/27/styling-the-decrement-button-and-increment-button-on-an-fxspinner-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

