<?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; HBox</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/hbox/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>Applying an effect when an HBox container is resized in Flex</title>
		<link>http://blog.flexexamples.com/2008/10/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/10/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 05:48:03 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Effects]]></category>
		<category><![CDATA[HBox]]></category>
		<category><![CDATA[resizeEffect]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can apply a resize effect to a Flex HBox container by setting the resizeEffect style/effect.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HBox_resizeEffect_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/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/ --&#62; &#60;mx:Application name="HBox_resizeEffect_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:HDividedBox id="hDividedBox" width="100%" height="100%"&#62; &#60;mx:HBox id="hBox1" backgroundColor="haloGreen" resizeEffect="Resize" width="100%" height="100%" /&#62; &#60;mx:HBox [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can apply a resize effect to a Flex HBox container by setting the <code>resizeEffect</code> style/effect.</p>
<p>Full code after the jump.</p>
<p><span id="more-814"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HBox_resizeEffect_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/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/ --&gt;
&lt;mx:Application name="HBox_resizeEffect_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:HDividedBox id="hDividedBox"
            width="100%"
            height="100%"&gt;
        &lt;mx:HBox id="hBox1"
                backgroundColor="haloGreen"
                resizeEffect="Resize"
                width="100%"
                height="100%" /&gt;
        &lt;mx:HBox id="hBox2"
                backgroundColor="haloBlue"
                resizeEffect="Resize"
                width="100%"
                height="100%" /&gt;
    &lt;/mx:HDividedBox&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HBox_resizeEffect_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/HBox_resizeEffect_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>resizeEffect</code> style/effect in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HBox_resizeEffect_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/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/ --&gt;
&lt;mx:Application name="HBox_resizeEffect_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        HBox {
            resizeEffect: ClassReference("mx.effects.Resize");
        }
    &lt;/mx:Style&gt;

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

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>resizeEffect</code> style/effect using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HBox_resizeEffect_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/10/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/ --&gt;
&lt;mx:Application name="HBox_resizeEffect_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.effects.Resize;

            private function init():void {
                hBox1.setStyle("resizeEffect", Resize);
                hBox2.setStyle("resizeEffect", Resize);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

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

&lt;/mx:Application&gt;
</pre>
<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/HBox_resizeEffect_test/bin/srcview/source/main4.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/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/ --&gt;
&lt;mx:Application name="HBox_resizeEffect_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.containers.HBox;
            import mx.containers.HDividedBox;
            import mx.effects.Resize;

            private var hBox1:HBox;
            private var hBox2:HBox;
            private var hDividedBox:HDividedBox;

            private function init():void {
                hBox1 = new HBox();
                hBox1.percentWidth = 100;
                hBox1.percentHeight = 100;
                hBox1.setStyle("backgroundColor", "haloGreen");
                hBox1.setStyle("resizeEffect", Resize);

                hBox2 = new HBox();
                hBox2.percentWidth = 100;
                hBox2.percentHeight = 100;
                hBox2.setStyle("backgroundColor", "haloBlue");
                hBox2.setStyle("resizeEffect", Resize);

                hDividedBox = new HDividedBox();
                hDividedBox.percentWidth = 100;
                hDividedBox.percentHeight = 100;
                hDividedBox.addChild(hBox1);
                hDividedBox.addChild(hBox2);
                addChild(hDividedBox);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Applying an effect when an HBox container is resized in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/10/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/',contentID: 'post-814',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'resizeEffect',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/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Clipping a Flex container&#8217;s content using the clipContent property</title>
		<link>http://blog.flexexamples.com/2008/02/02/clipping-a-flex-containers-content-using-the-clipcontent-property/</link>
		<comments>http://blog.flexexamples.com/2008/02/02/clipping-a-flex-containers-content-using-the-clipcontent-property/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 01:42:03 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Box]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[HBox]]></category>
		<category><![CDATA[VBox]]></category>
		<category><![CDATA[clipContent]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/02/clipping-a-flex-containers-content-using-the-clipcontent-property/</guid>
		<description><![CDATA[<p>The following example shows how you can clip a container&#8217;s content in Flex by setting the clipContent property.<br /> According to the Flex 3 documentation for the Container class&#8217;s clipContent property:</p> <p> Whether to apply a clip mask if the positions and/or sizes of this container&#8217;s children extend outside the borders of this container. If [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can clip a container&#8217;s content in Flex by setting the clipContent property.<br />
According to the Flex 3 documentation for the Container class&#8217;s <code>clipContent</code> property:</p>
<blockquote><p>
Whether to apply a clip mask if the positions and/or sizes of this container&#8217;s children extend outside the borders of this container. If <code>false</code>, the children of this container remain visible when they are moved or sized outside the borders of this container. If <code>true</code>, the children of this container are clipped.<br />
If <code>clipContent</code> is <code>false</code>, then scrolling is disabled for this container and scrollbars will not appear. If <code>clipContent</code> is <code>true</code>, then scrollbars will usually appear when the container&#8217;s children extend outside the border of the container.<br />
The default value is <code>true</code>.
</p></blockquote>
<p><span id="more-508"></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/2008/02/02/clipping-a-flex-containers-content-using-the-clipcontent-property/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;Box_clipContent_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;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;checkBox&quot;</span></span>
<span style="color: #000000;">                label=<span style="color: #ff0000;">&quot;clipContent:&quot;</span></span>
<span style="color: #000000;">                labelPlacement=<span style="color: #ff0000;">&quot;left&quot;</span></span>
<span style="color: #000000;">                selected=<span style="color: #ff0000;">&quot;false&quot;</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:Box</span> id=<span style="color: #ff0000;">&quot;box&quot;</span></span>
<span style="color: #000000;">            clipContent=<span style="color: #ff0000;">&quot;{checkBox.selected}&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;320&quot;</span></span>
<span style="color: #000000;">            height=<span style="color: #ff0000;">&quot;240&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> id=<span style="color: #ff0000;">&quot;img&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;http://www.helpexamples.com/flash/images/image1.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Box</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;{img.width} x {img.height}&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>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Box_clipContent_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/Box_clipContent_test/bin/main.html" width="100%" height="400"></iframe></p>
<p>As you can see, the Box container is set to 320 pixels wide by 240 pixels high. The image being loaded is 400 pixels high by 267 pixels wide. When the <code>clipContent</code> property is set to <code>false</code>, the image exceeds the bounds of the Box container causing it to overlap the Label control. If you set the <code>clipContent</code> property to <code>true</code>, the image doesn&#8217;t exceed the bounds of the Box container and horizontal and vertical scroll bars appear, allowing you to scroll to see the rest of the content.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Clipping a Flex container\&#039;s content using the clipContent property on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/02/02/clipping-a-flex-containers-content-using-the-clipcontent-property/',contentID: 'post-508',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'clipContent',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/02/02/clipping-a-flex-containers-content-using-the-clipcontent-property/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

