<?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; visible</title>
	<atom:link href="http://blog.flexexamples.com/tag/visible/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>Modifying the corner white box on an MX Container when scroll bars are visible in Flex</title>
		<link>http://blog.flexexamples.com/2010/05/05/modifying-the-corner-white-box-on-an-mx-container-when-scroll-bars-are-visible-in-flex/</link>
		<comments>http://blog.flexexamples.com/2010/05/05/modifying-the-corner-white-box-on-an-mx-container-when-scroll-bars-are-visible-in-flex/#comments</comments>
		<pubDate>Wed, 05 May 2010 23:51:13 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HBox]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[backgroundAlpha]]></category>
		<category><![CDATA[backgroundColor]]></category>
		<category><![CDATA[getChildByName()]]></category>
		<category><![CDATA[horizontalScrollPolicy]]></category>
		<category><![CDATA[rawChildren]]></category>
		<category><![CDATA[verticalScrollPolicy]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2938</guid>
		<description><![CDATA[<p>The following example shows how you can modify the visibility and alpha of the white box in the lower-right corner of an MX Container in Flex when both the horizontal and vertical scroll bars are visible by using the rawChildren property and getChildByName() method.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/05/05/modifying-the-corner-white-box-on-an-mx-container-when-scroll-bars-are-visible-in-flex/ --&#62; &#60;mx:Application name=&#34;MX_Container_whiteBox_alpha_test&#34; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;vertical&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can modify the visibility and alpha of the white box in the lower-right corner of an MX Container in Flex when both the horizontal and vertical scroll bars are visible by using the <code>rawChildren</code> property and <code>getChildByName()</code> method.</p>
<p><span id="more-2938"></span></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> 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/2010/05/05/modifying-the-corner-white-box-on-an-mx-container-when-scroll-bars-are-visible-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;MX_Container_whiteBox_alpha_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundGradientColors=<span style="color: #ff0000;">&quot;[#FF0000,#FF00FF]&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.FlexEvent;</span>
&nbsp;
<span style="color: #339933;">            protected var wBox:DisplayObject;</span>
&nbsp;
<span style="color: #339933;">            protected function hBox_creationCompleteHandler(evt:FlexEvent):void {</span>
<span style="color: #339933;">                wBox = hBox.rawChildren.getChildByName(&quot;whiteBox&quot;);</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            protected function sldr1_changeHandler(evt:Event):void {</span>
<span style="color: #339933;">                wBox.alpha = sldr1.value;</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            protected function chckBx_changeHandler(evt:Event):void {</span>
<span style="color: #339933;">                wBox.visible = chckBx.selected;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span><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;whiteBox alpha:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HSlider</span> id=<span style="color: #ff0000;">&quot;sldr1&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;0.0&quot;</span> maximum=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #000000;">                        snapInterval=<span style="color: #ff0000;">&quot;0.1&quot;</span></span>
<span style="color: #000000;">                        tickInterval=<span style="color: #ff0000;">&quot;0.1&quot;</span></span>
<span style="color: #000000;">                        liveDragging=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;sldr1_changeHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;whiteBox visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;chckBx&quot;</span></span>
<span style="color: #000000;">                        selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;chckBx_changeHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;HBox backgroundAlpha:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HSlider</span> id=<span style="color: #ff0000;">&quot;sldr2&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;0.0&quot;</span> maximum=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #000000;">                        snapInterval=<span style="color: #ff0000;">&quot;0.1&quot;</span></span>
<span style="color: #000000;">                        tickInterval=<span style="color: #ff0000;">&quot;0.1&quot;</span></span>
<span style="color: #000000;">                        liveDragging=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;HBox backgroundColor:&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;clrPckr&quot;</span></span>
<span style="color: #000000;">                        selectedColor=<span style="color: #ff0000;">&quot;green&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:HBox</span> id=<span style="color: #ff0000;">&quot;hBox&quot;</span></span>
<span style="color: #000000;">            backgroundAlpha=<span style="color: #ff0000;">&quot;{sldr2.value}&quot;</span></span>
<span style="color: #000000;">            backgroundColor=<span style="color: #ff0000;">&quot;{clrPckr.selectedColor}&quot;</span></span>
<span style="color: #000000;">            horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span> verticalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;240&quot;</span> height=<span style="color: #ff0000;">&quot;160&quot;</span></span>
<span style="color: #000000;">            paddingLeft=<span style="color: #ff0000;">&quot;10&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;10&quot;</span></span>
<span style="color: #000000;">            paddingTop=<span style="color: #ff0000;">&quot;10&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;10&quot;</span></span>
<span style="color: #000000;">            creationComplete=<span style="color: #ff0000;">&quot;hBox_creationCompleteHandler(event);&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> label=<span style="color: #ff0000;">&quot;MX Button&quot;</span> width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:HBox</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Modifying the corner white box on an MX Container when scroll bars are visible in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/05/05/modifying-the-corner-white-box-on-an-mx-container-when-scroll-bars-are-visible-in-flex/',contentID: 'post-2938',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'alpha,backgroundAlpha,backgroundColor,getChildByName(),horizontalScrollPolicy,rawChildren,verticalScrollPolicy,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/05/05/modifying-the-corner-white-box-on-an-mx-container-when-scroll-bars-are-visible-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determining if the scroll bars are visible in a Spark Scroller container in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/04/30/determining-if-the-scroll-bars-are-visible-in-a-spark-scroller-container-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/04/30/determining-if-the-scroll-bars-are-visible-in-a-spark-scroller-container-in-flex-4/#comments</comments>
		<pubDate>Sat, 01 May 2010 00:39:01 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Flex4]]></category>
		<category><![CDATA[HScrollBar (Spark)]]></category>
		<category><![CDATA[Scroller (Spark)]]></category>
		<category><![CDATA[VScrollBar (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[horizontalScrollBar]]></category>
		<category><![CDATA[verticalScrollBar]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2918</guid>
		<description><![CDATA[<p>The following example shows how you can determine if the vertical and/or horizontal scroll bars are visible on a Spark Scroller container in Flex 4 by checking the verticalScrollBar or horizontalScrollBar skin part&#8217;s Boolean visible property.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/04/30/determining-if-the-scroll-bars-are-visible-in-a-spark-scroller-container-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_Scroller_verticalScrollBar_visible_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; &#60;s:controlBarContent&#62; &#60;mx:Form&#62; &#60;mx:FormItem label=&#34;width:&#34;&#62; &#60;s:HSlider id=&#34;wSl&#34; minimum=&#34;100&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can determine if the vertical and/or horizontal scroll bars are visible on a Spark Scroller container in Flex 4 by checking the <code>verticalScrollBar</code> or <code>horizontalScrollBar</code> skin part&#8217;s Boolean <code>visible</code> property.</p>
<p><span id="more-2918"></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/2010/04/30/determining-if-the-scroll-bars-are-visible-in-a-spark-scroller-container-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_Scroller_verticalScrollBar_visible_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>
    <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;width:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;wSl&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;100&quot;</span> maximum=<span style="color: #ff0000;">&quot;400&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;wSl_changeHandler(event);&quot;</span></span>
<span style="color: #000000;">                        changeEnd=<span style="color: #ff0000;">&quot;wSl_changeHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;height:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;hSl&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;100&quot;</span> maximum=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;hSl_changeHandler(event);&quot;</span></span>
<span style="color: #000000;">                        changeEnd=<span style="color: #ff0000;">&quot;hSl_changeHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/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;">            protected function wSl_changeHandler<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                horFrmItm.required = scr.horizontalScrollBar.visible;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function hSl_changeHandler<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                verFrmItm.required = scr.verticalScrollBar.visible;</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:Panel</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:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> paddingTop=<span style="color: #ff0000;">&quot;0&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> id=<span style="color: #ff0000;">&quot;horFrmItm&quot;</span> label=<span style="color: #ff0000;">&quot;horizontal scroll bar visible:&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> id=<span style="color: #ff0000;">&quot;verFrmItm&quot;</span> label=<span style="color: #ff0000;">&quot;vertical scroll bar visible:&quot;</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>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Scroller</span> id=<span style="color: #ff0000;">&quot;scr&quot;</span></span>
<span style="color: #000000;">                width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;160&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;rect&quot;</span></span>
<span style="color: #000000;">                        width=<span style="color: #ff0000;">&quot;{wSl.value}&quot;</span> height=<span style="color: #ff0000;">&quot;{hSl.value}&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:LinearGradient</span> rotation=<span style="color: #ff0000;">&quot;45&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> color=<span style="color: #ff0000;">&quot;haloGreen&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> color=<span style="color: #ff0000;">&quot;haloBlue&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:LinearGradient</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Scroller</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Panel</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_Scroller_verticalScrollBar_visible_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_Scroller_verticalScrollBar_visible_test/main.html" width="100%" height="450"></iframe></p>
<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: 'Determining if the scroll bars are visible in a Spark Scroller container in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/04/30/determining-if-the-scroll-bars-are-visible-in-a-spark-scroller-container-in-flex-4/',contentID: 'post-2918',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,horizontalScrollBar,verticalScrollBar,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/04/30/determining-if-the-scroll-bars-are-visible-in-a-spark-scroller-container-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hiding the text field on an MX DateField control in Flex 3</title>
		<link>http://blog.flexexamples.com/2010/03/28/hiding-the-text-field-on-an-mx-datefield-control-in-flex-3/</link>
		<comments>http://blog.flexexamples.com/2010/03/28/hiding-the-text-field-on-an-mx-datefield-control-in-flex-3/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 06:13:09 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DateField]]></category>
		<category><![CDATA[getTextInput()]]></category>
		<category><![CDATA[includeInLayout]]></category>
		<category><![CDATA[mx_internal]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2656</guid>
		<description><![CDATA[<p>The following example shows how you can hide the text input field on the MX DateField control in Flex 3 by setting the Boolean visible and includeInLayout properties on the internal text field (using the getTextField() method in the mx_internal namespace).</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/03/28/hiding-the-text-field-on-an-mx-datefield-control-in-flex-3/ --&#62; &#60;mx:Application name=&#34;MX_DateField_getTextInput_test&#34; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;vertical&#34; verticalAlign=&#34;top&#34; backgroundColor=&#34;white&#34;&#62; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can hide the text input field on the MX DateField control in Flex 3 by setting the Boolean <code>visible</code> and <code>includeInLayout</code> properties on the internal text field (using the <code>getTextField()</code> method in the <code>mx_internal</code> namespace).</p>
<p><span id="more-2656"></span></p>
<p class="alert">Since this example uses the <strong>mx_internal</strong> namespace, you can't always depend on this behavior to work in future versions of the Flex SDK. Use at your own risk.</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/2010/03/28/hiding-the-text-field-on-an-mx-datefield-control-in-flex-3/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;MX_DateField_getTextInput_test&quot;</span></span>
<span style="color: #000000;">                xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">                layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">                verticalAlign=<span style="color: #ff0000;">&quot;top&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.controls.TextInput;</span>
&nbsp;
<span style="color: #339933;">            protected function init():void {</span>
<span style="color: #339933;">                var tf:TextInput = df.mx_internal::getTextInput();</span>
<span style="color: #339933;">                tf.visible = false;</span>
<span style="color: #339933;">                tf.includeInLayout = false;</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:DateField</span> id=<span style="color: #ff0000;">&quot;df&quot;</span> initialize=<span style="color: #ff0000;">&quot;init();&quot;</span> width=<span style="color: #ff0000;">&quot;23&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;{df.selectedDate}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Hiding the text field on an MX DateField control in Flex 3 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/03/28/hiding-the-text-field-on-an-mx-datefield-control-in-flex-3/',contentID: 'post-2656',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'getTextInput(),includeInLayout,mx_internal,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/03/28/hiding-the-text-field-on-an-mx-datefield-control-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Pausing a video in the Spark VideoPlayer control when it is removed from the display list in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/12/07/pausing-a-video-in-the-spark-videoplayer-control-when-it-is-removed-from-the-display-list-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/12/07/pausing-a-video-in-the-spark-videoplayer-control-when-it-is-removed-from-the-display-list-in-flex-4/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:26:18 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[VideoPlayer (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[pauseWhenHidden]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2235</guid>
		<description><![CDATA[<p>The following example shows how you can pause a Spark VideoPlayer control when it is hidden or removed from the display list in Flex 4 by setting the Boolean pauseWhenHidden property.</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/12/07/pausing-a-video-in-the-spark-videoplayer-control-when-it-is-removed-from-the-display-list-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_VideoPlayer_pauseWhenHidden_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; &#60;s:controlBarContent&#62; &#60;mx:Form styleName=&#34;plain&#34; contentBackgroundAlpha=&#34;0.0&#34;&#62; &#60;mx:FormItem label=&#34;pauseWhenHidden:&#34;&#62; &#60;s:CheckBox [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can pause a Spark VideoPlayer control when it is hidden or removed from the display list in Flex 4 by setting the Boolean <code>pauseWhenHidden</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-2235"></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/12/07/pausing-a-video-in-the-spark-videoplayer-control-when-it-is-removed-from-the-display-list-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_VideoPlayer_pauseWhenHidden_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>
    <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> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span> contentBackgroundAlpha=<span style="color: #ff0000;">&quot;0.0&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;pauseWhenHidden:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:CheckBox</span> id=<span style="color: #ff0000;">&quot;chBx1&quot;</span></span>
<span style="color: #000000;">                        selected=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;visible:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:CheckBox</span> id=<span style="color: #ff0000;">&quot;chBx2&quot;</span></span>
<span style="color: #000000;">                        selected=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VideoPlayer</span> id=<span style="color: #ff0000;">&quot;vdPlyr&quot;</span></span>
<span style="color: #000000;">            source=<span style="color: #ff0000;">&quot;http://helpexamples.com/flash/video/caption_video.flv&quot;</span></span>
<span style="color: #000000;">            pauseWhenHidden=<span style="color: #ff0000;">&quot;{chBx1.selected}&quot;</span></span>
<span style="color: #000000;">            visible=<span style="color: #ff0000;">&quot;{chBx2.selected}&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>

<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: 'Pausing a video in the Spark VideoPlayer control when it is removed from the display list in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/12/07/pausing-a-video-in-the-spark-videoplayer-control-when-it-is-removed-from-the-display-list-in-flex-4/',contentID: 'post-2235',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,pauseWhenHidden,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/12/07/pausing-a-video-in-the-spark-videoplayer-control-when-it-is-removed-from-the-display-list-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling dividers in an HDividedBox container in Flex</title>
		<link>http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 15:19:46 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HDividedBox]]></category>
		<category><![CDATA[dividerSkin]]></category>
		<category><![CDATA[getDividerAt()]]></category>
		<category><![CDATA[horizontalGap]]></category>
		<category><![CDATA[numDividers]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can disable the dividers in a Flex HDividedBox container by using the numDividers property, getDividerAt() method, and setting the visible property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HDividedBox_getDividerAt_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/ --&#62; &#60;mx:Application name=&#34;HDividedBox_getDividerAt_test&#34; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;vertical&#34; verticalAlign=&#34;middle&#34; backgroundColor=&#34;white&#34;&#62; &#60;mx:Script&#62; &#60;![CDATA[ private function checkBox_change(evt:Event):void { [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can disable the dividers in a Flex HDividedBox container by using the <code>numDividers</code> property, <code>getDividerAt()</code> method, and setting the <code>visible</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-825"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HDividedBox_getDividerAt_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/ --&gt;
&lt;mx:Application name=&quot;HDividedBox_getDividerAt_test&quot;
        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[
            private function checkBox_change(evt:Event):void {
                var value:Boolean = !checkBox.selected;
                var idx:uint;
                var len:uint = hDividedBox.numDividers;
                for (idx = 0; idx &lt; len; idx++) {
                    hDividedBox.getDividerAt(idx).visible = value;
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:CheckBox id=&quot;checkBox&quot;
                label=&quot;Disable dividers:&quot;
                labelPlacement=&quot;left&quot;
                change=&quot;checkBox_change(event);&quot; /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:HDividedBox id=&quot;hDividedBox&quot;
            width=&quot;100%&quot;
            height=&quot;100%&quot;&gt;
        &lt;mx:HBox id=&quot;hBox1&quot;
                width=&quot;100%&quot;
                height=&quot;100%&quot;
                backgroundColor=&quot;haloGreen&quot;&gt;
        &lt;/mx:HBox&gt;
        &lt;mx:HBox id=&quot;hBox2&quot;
                width=&quot;100%&quot;
                height=&quot;100%&quot;
                backgroundColor=&quot;haloBlue&quot;&gt;
        &lt;/mx:HBox&gt;
        &lt;mx:HBox id=&quot;hBox3&quot;
                width=&quot;100%&quot;
                height=&quot;100%&quot;
                backgroundColor=&quot;haloOrange&quot;&gt;
        &lt;/mx:HBox&gt;
    &lt;/mx:HDividedBox&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HDividedBox_getDividerAt_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/HDividedBox_getDividerAt_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HDividedBox_getDividerAt_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/ --&gt;
&lt;mx:Application name=&quot;HDividedBox_getDividerAt_test&quot;
        xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;
        initialize=&quot;init();&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.containers.ApplicationControlBar;
            import mx.containers.HBox;
            import mx.containers.HDividedBox;
            import mx.controls.ButtonLabelPlacement;
            import mx.controls.CheckBox;

            private var checkBox:CheckBox;
            private var hBox1:HBox;
            private var hBox2:HBox;
            private var hBox3:HBox;
            private var hDividedBox:HDividedBox;

            private function init():void {
                checkBox = new CheckBox();
                checkBox.label = &quot;Disable dividers:&quot;;
                checkBox.labelPlacement = ButtonLabelPlacement.LEFT;
                checkBox.addEventListener(Event.CHANGE,
                            checkBox_change);

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

                hBox1 = new HBox();
                hBox1.percentWidth = 100;
                hBox1.percentHeight = 100;
                hBox1.setStyle(&quot;backgroundColor&quot;, &quot;haloGreen&quot;);

                hBox2 = new HBox();
                hBox2.percentWidth = 100;
                hBox2.percentHeight = 100;
                hBox2.setStyle(&quot;backgroundColor&quot;, &quot;haloBlue&quot;);

                hBox3 = new HBox();
                hBox3.percentWidth = 100;
                hBox3.percentHeight = 100;
                hBox3.setStyle(&quot;backgroundColor&quot;, &quot;haloOrange&quot;);

                hDividedBox = new HDividedBox();
                hDividedBox.percentWidth = 100;
                hDividedBox.percentHeight = 100;
                hDividedBox.addChild(hBox1);
                hDividedBox.addChild(hBox2);
                hDividedBox.addChild(hBox3);
                addChild(hDividedBox);
            }

            private function checkBox_change(evt:Event):void {
                var value:Boolean = !checkBox.selected;
                var idx:uint;
                var len:uint = hDividedBox.numDividers;
                for (idx = 0; idx &lt; len; idx++) {
                    hDividedBox.getDividerAt(idx).visible = value;
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<p class="new">If you want to remove the gap between the HDividedBox children after disabling the dividers, you can set the <code>horizontalGap</code> style, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HDividedBox_getDividerAt_test_2/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/ --&gt;
&lt;mx:Application name=&quot;HDividedBox_getDividerAt_test&quot;
        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[
            private function checkBox_change(evt:Event):void {
                <strong style="color:red;">var hGap:Class = hDividedBox.getStyle(&quot;dividerSkin&quot;);</strong>
                var value:Boolean = !checkBox.selected;
                var idx:uint;
                var len:uint = hDividedBox.numDividers;
                for (idx = 0; idx &lt; len; idx++) {
                    hDividedBox.getDividerAt(idx).visible = value;
                }
                <strong style="color:red;">if (value) {
                    hDividedBox.setStyle(&quot;horizontalGap&quot;, hGap.width);
                } else {
                    hDividedBox.setStyle(&quot;horizontalGap&quot;, 0);
                }</strong>
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:CheckBox id=&quot;checkBox&quot;
                label=&quot;Disable dividers:&quot;
                labelPlacement=&quot;left&quot;
                change=&quot;checkBox_change(event);&quot; /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:HDividedBox id=&quot;hDividedBox&quot;
            minHeight=&quot;100&quot;
            width=&quot;100%&quot;
            height=&quot;100%&quot;&gt;
        &lt;mx:HBox id=&quot;hBox1&quot;
                minWidth=&quot;20&quot;
                width=&quot;100%&quot;
                height=&quot;100%&quot;
                backgroundColor=&quot;haloGreen&quot;&gt;
        &lt;/mx:HBox&gt;
        &lt;mx:HBox id=&quot;hBox2&quot;
                minWidth=&quot;20&quot;
                width=&quot;100%&quot;
                height=&quot;100%&quot;
                backgroundColor=&quot;haloBlue&quot;&gt;
        &lt;/mx:HBox&gt;
        &lt;mx:HBox id=&quot;hBox3&quot;
                minWidth=&quot;20&quot;
                width=&quot;100%&quot;
                height=&quot;100%&quot;
                backgroundColor=&quot;haloOrange&quot;&gt;
        &lt;/mx:HBox&gt;
    &lt;/mx:HDividedBox&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HDividedBox_getDividerAt_test_2/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/HDividedBox_getDividerAt_test_2/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Disabling dividers in an HDividedBox container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/',contentID: 'post-825',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'dividerSkin,getDividerAt(),horizontalGap,numDividers,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/10/11/disabling-dividers-in-an-hdividedbox-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Toggling form item visibility in a Form container in Flex</title>
		<link>http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 06:32:47 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[FormItem]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[includeInLayout]]></category>
		<category><![CDATA[visible]]></category>

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

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

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

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

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

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_includeInLayout_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/FormItem_includeInLayout_test/bin/main.html" width="100%" height="350"></iframe></p>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/FormItem_includeInLayout_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/ --&gt;
&lt;mx:Application name="FormItem_includeInLayout_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();"&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling form item visibility in a Form container in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/',contentID: 'post-817',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'includeInLayout,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/10/03/toggling-form-item-visibility-in-a-form-container-in-flex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hiding nested controls in a Flex RichTextEditor control</title>
		<link>http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/</link>
		<comments>http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 07:01:31 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[RichTextEditor]]></category>
		<category><![CDATA[includeInLayout]]></category>
		<category><![CDATA[linkTextInput]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/</guid>
		<description><![CDATA[<p>The following example shows you how you can toggle the RichTextEditor control&#8217;s nested link text input by setting both the visible and includeInLayout properties of the control.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_linkTextInput_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/ --&#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.controls.TextInput; private function toggle_linkTextInput():void [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can toggle the RichTextEditor control&#8217;s nested link text input by setting both the <code>visible</code> and <code>includeInLayout</code> properties of the control.</p>
<p>Full code after the jump.</p>
<p><span id="more-328"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_linkTextInput_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/23/hiding-nested-controls-in-a-flex-richtexteditor-control/ --&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.controls.TextInput;

            private function toggle_linkTextInput():void {
                var textInput:TextInput = richTextEditor.linkTextInput;
                var isSelected:Boolean = checkBox.selected;
                textInput.visible = isSelected;
                textInput.includeInLayout = isSelected;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:CheckBox id="checkBox"
                label="RichTextEditor linkTextInput visible:"
                labelPlacement="left"
                selected="true"
                change="toggle_linkTextInput();" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:RichTextEditor id="richTextEditor" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/RichTextEditor_linkTextInput_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/RichTextEditor_linkTextInput_test/bin/main.html" width="100%" height="400"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Hiding nested controls in a Flex RichTextEditor control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/',contentID: 'post-328',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'includeInLayout,linkTextInput,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/11/23/hiding-nested-controls-in-a-flex-richtexteditor-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Triggering effects when a container&#8217;s visibility is changed</title>
		<link>http://blog.flexexamples.com/2007/09/20/triggering-effects-when-a-containers-visibility-is-changed/</link>
		<comments>http://blog.flexexamples.com/2007/09/20/triggering-effects-when-a-containers-visibility-is-changed/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 07:19:15 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Effects]]></category>
		<category><![CDATA[Panel]]></category>
		<category><![CDATA[Zoom]]></category>
		<category><![CDATA[hideEffect]]></category>
		<category><![CDATA[showEffect]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/20/triggering-effects-when-a-containers-visibility-is-changed/</guid>
		<description><![CDATA[<p>The following example shows you how you can trigger effects when the visible property changes on a Flex container or control by using the hideEffect and showEffect effects.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_showEffect_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/09/20/triggering-effects-when-a-containers-visibility-is-changed/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Zoom id="zoom" /&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:Button [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can trigger effects when the <code>visible</code> property changes on a Flex container or control by using the <code>hideEffect</code> and <code>showEffect</code> effects.</p>
<p>Full code after the jump.</p>
<p><span id="more-196"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_showEffect_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/20/triggering-effects-when-a-containers-visibility-is-changed/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Zoom id="zoom" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="hide"
                click="panel.visible = false;"
                enabled="{panel.visible}" /&gt;
        &lt;mx:Button label="show"
                click="panel.visible = true;"
                enabled="{!panel.visible}" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Panel id="panel"
            title="title"
            status="status"
            showEffect="{zoom}"
            hideEffect="{zoom}"
            width="100%"
            height="100%"&gt;

        &lt;mx:ControlBar&gt;
            &lt;mx:Label text="control bar" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_showEffect_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/Panel_showEffect_test/bin/main.html" width="100%" height="300"></iframe></p>
<p class="new">If you want to use a specific easing type (Back, Bounce, Elastic, etc), you can use the following snippet specify the easing function that will be applied to the animation:</p>
<pre class="code">
&lt;mx:Script&gt;
    &lt;![CDATA[
        import mx.effects.easing.Bounce;
    ]]&gt;
&lt;/mx:Script&gt;

&lt;mx:Zoom id="zoom" easingFunction="Bounce.easeOut" /&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_showEffect_test_2/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Panel_showEffect_test_2/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Triggering effects when a container\&#039;s visibility is changed on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/20/triggering-effects-when-a-containers-visibility-is-changed/',contentID: 'post-196',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'hideEffect,showEffect,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/09/20/triggering-effects-when-a-containers-visibility-is-changed/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Toggling a Flex container&#8217;s visibility</title>
		<link>http://blog.flexexamples.com/2007/08/23/toggling-a-flex-containers-visibility/</link>
		<comments>http://blog.flexexamples.com/2007/08/23/toggling-a-flex-containers-visibility/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 06:07:45 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[VBox]]></category>
		<category><![CDATA[includeInLayout]]></category>
		<category><![CDATA[visible]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/23/toggling-a-flex-containers-visibility/</guid>
		<description><![CDATA[<p>The following example shows a pretty crude method for toggling a container&#8217;s visibility and removing it from the Flex application layout. Mind you, this probably isn&#8217;t the preferred/recommended method of doing this (I imagine using states would be a lot nicer/cleaner) but hey, I&#8217;ll have to save that method up for another entry.</p> <p>Full code [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows a pretty crude method for toggling a container&#8217;s visibility and removing it from the Flex application layout. Mind you, this probably isn&#8217;t the preferred/recommended method of doing this (I imagine using states would be a lot nicer/cleaner) but hey, I&#8217;ll have to save that method up for another entry.</p>
<p>Full code after the jump.</p>
<p><span id="more-115"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/VBox_includeInLayout_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/08/23/toggling-a-flex-containers-visibility/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        VBox {
            paddingLeft: 10;
            paddingRight: 10;
            paddingTop: 10;
            paddingBottom: 10;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            [Bindable]
            [Embed(source="assets/help.png")]
            private var helpIcon:Class;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:HBox width="100%" height="100%"&gt;
        &lt;mx:VBox id="vbox1"
                width="120"
                height="100%"
                backgroundColor="haloOrange"&gt;
            &lt;mx:Label text="VBox 1" /&gt;
            &lt;mx:Button label="Help"
                    icon="{helpIcon}"
                    click="vbox2.visible = !vbox2.visible" /&gt;
        &lt;/mx:VBox&gt;

        &lt;mx:VBox id="vbox2"
                width="120"
                height="100%"
                backgroundColor="haloGreen"
                creationComplete="vbox2.visible = false"
                includeInLayout="{vbox2.visible}"&gt;
            &lt;mx:Label text="VBox 2" /&gt;
        &lt;/mx:VBox&gt;

        &lt;mx:VBox id="vbox3"
                width="100%"
                height="100%"
                backgroundColor="haloBlue"&gt;
            &lt;mx:Label text="VBox 3" /&gt;
        &lt;/mx:VBox&gt;
    &lt;/mx:HBox&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/VBox_includeInLayout_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/VBox_includeInLayout_test/bin/main.html" width="100%" height="250"></iframe></p>
<p class="new">For an example of using states to toggle containers, see <a href="http://blog.flexexamples.com/2007/08/24/toggling-a-flex-containers-visibility-using-states/">&#8220;Toggling a Flex container&#8217;s visibility using states&#8221;</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling a Flex container\&#039;s visibility on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/08/23/toggling-a-flex-containers-visibility/',contentID: 'post-115',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'includeInLayout,visible',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/08/23/toggling-a-flex-containers-visibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

