<?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; Box</title>
	<atom:link href="http://blog.flexexamples.com/category/box/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing the arrow button skins on a Flex container&#8217;s scroll bars</title>
		<link>http://blog.flexexamples.com/2008/02/10/changing-the-arrow-button-skins-on-a-flex-containers-scroll-bars/</link>
		<comments>http://blog.flexexamples.com/2008/02/10/changing-the-arrow-button-skins-on-a-flex-containers-scroll-bars/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 07:34:11 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Box]]></category>
		<category><![CDATA[downArrowSkin]]></category>
		<category><![CDATA[horizontalScrollBarStyleName]]></category>
		<category><![CDATA[upArrowSkin]]></category>
		<category><![CDATA[verticalScrollBarStyleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/10/changing-the-arrow-button-skins-on-a-flex-containers-scroll-bars/</guid>
		<description><![CDATA[<p>The following example shows how you can change the up arrow and down arrow skins on a horizontal/vertical scroll bar in a Flex container by setting the horizontalScrollBarStyleName, verticalScrollBarStyleName, downArrowSkin, and upArrowSkin styles.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Container_verticalScrollBarStyleName_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/02/10/changing-the-arrow-button-skins-on-a-flex-containers-scroll-bars/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the up arrow and down arrow skins on a horizontal/vertical scroll bar in a Flex container by setting the <code>horizontalScrollBarStyleName</code>, <code>verticalScrollBarStyleName</code>, <code>downArrowSkin</code>, and <code>upArrowSkin</code> styles.</p>
<p>Full code after the jump.</p>
<p><span id="more-510"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Container_verticalScrollBarStyleName_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/02/10/changing-the-arrow-button-skins-on-a-flex-containers-scroll-bars/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        Container {
            verticalScrollBarStyleName: myVScrollBarStyleName;
            horizontalScrollBarStyleName: myHScrollBarStyleName;
        }

        .myVScrollBarStyleName {
            downArrowSkin: Embed("assets/bullet_add.png");
            upArrowSkin: Embed("assets/bullet_delete.png");
        }

        .myHScrollBarStyleName {
            downArrowSkin: Embed("assets/bullet_add.png");
            upArrowSkin: Embed("assets/bullet_delete.png");
        }
    &lt;/mx:Style&gt;

    &lt;mx:String id="lorem" source="lorem.txt" /&gt;

    &lt;mx:Box clipContent="true"
            backgroundColor="haloSilver"
            horizontalScrollPolicy="on"
            verticalScrollPolicy="on"
            width="320"
            height="240"&gt;
        &lt;mx:Text text="{lorem}" width="550" /&gt;
    &lt;/mx:Box&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Container_verticalScrollBarStyleName_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/Container_verticalScrollBarStyleName_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the arrow button skins on a Flex container\&#039;s scroll bars on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/02/10/changing-the-arrow-button-skins-on-a-flex-containers-scroll-bars/',contentID: 'post-510',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'downArrowSkin,horizontalScrollBarStyleName,upArrowSkin,verticalScrollBarStyleName',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/10/changing-the-arrow-button-skins-on-a-flex-containers-scroll-bars/feed/</wfw:commentRss>
		<slash:comments>12</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>
		<item>
		<title>Changing a Box container&#8217;s direction in Flex</title>
		<link>http://blog.flexexamples.com/2008/01/04/changing-a-box-containers-direction-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/01/04/changing-a-box-containers-direction-in-flex/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 07:21:51 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Box]]></category>
		<category><![CDATA[BoxDirection]]></category>
		<category><![CDATA[direction]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/04/changing-a-box-containers-direction-in-flex/</guid>
		<description><![CDATA[<p>The following example shows you how you can change the direction of a Box container in Flex by setting the direction property to one of the constants in the BoxDirection class. The &#60;mx:Box /&#62; container is the superclass of the HBox container and VBox container. The subclasses (HBox and VBox) do not add any new [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows you how you can change the direction of a Box container in Flex by setting the <code>direction</code> property to one of the constants in the BoxDirection class. The &lt;mx:Box /&gt; container is the superclass of the HBox container and VBox container. The subclasses (HBox and VBox) do not add any new functionality, they simply set the <code>direction</code> property automatically to &#8220;horizontal&#8221; or &#8220;vertical&#8221;.</p>
<p>Full code after the jump.</p>
<p><span id="more-424"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Box_direction_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/04/changing-a-box-containers-direction-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        .myBox {
            paddingLeft: 10;
            paddingRight: 10;
            paddingTop: 10;
            paddingBottom: 10;
            backgroundColor: haloSilver;
        }
    &lt;/mx:Style&gt;

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

            private function comboBox_init():void {
                var arr:Array = [];
                arr.push({label:BoxDirection.HORIZONTAL});
                arr.push({label:BoxDirection.VERTICAL});
                comboBox.dataProvider = arr;
            }

            private function comboBox_change(evt:ListEvent):void {
                box.direction = comboBox.selectedLabel;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="direction:"&gt;
                &lt;mx:ComboBox id="comboBox"
                        initialize="comboBox_init();"
                        change="comboBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Box id="box" direction="horizontal" styleName="myBox"&gt;
        &lt;mx:Image source="Button.png" toolTip="Button" /&gt;
        &lt;mx:Image source="ButtonBar.png" toolTip="ButtonBar" /&gt;
        &lt;mx:Image source="CheckBox.png" toolTip="CheckBox" /&gt;
        &lt;mx:Image source="ColorPicker.png" toolTip="ColorPicker" /&gt;
        &lt;mx:Image source="ComboBox.png" toolTip="ComboBox" /&gt;
    &lt;/mx:Box&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Box_direction_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_direction_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing a Box container\&#039;s direction in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/04/changing-a-box-containers-direction-in-flex/',contentID: 'post-424',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'direction',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/01/04/changing-a-box-containers-direction-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

