<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/09/17/setting-a-custom-divider-color-on-the-dividedbox-container-in-flex/ -->
<mx:Application name="HDividedBox_dividerColor_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();">

    <mx:Script>
        <![CDATA[
            import mx.containers.ApplicationControlBar;
            import mx.containers.Box;
            import mx.containers.Form;
            import mx.containers.FormItem;
            import mx.containers.HDividedBox;
            import mx.controls.ColorPicker;
            import mx.events.ColorPickerEvent;

            private var colorPicker:ColorPicker;
            private var box1:Box;
            private var box2:Box;
            private var dividedBox:HDividedBox;

            private function init():void {
                colorPicker = new ColorPicker();
                colorPicker.addEventListener(ColorPickerEvent.CHANGE,
                            colorPicker_change);

                var formItem:FormItem = new FormItem();
                formItem.label = "dividerColor:";
                formItem.addChild(colorPicker);

                var form:Form = new Form();
                form.styleName = "plain";
                form.addChild(formItem);

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

                box1 = new Box();
                box1.percentWidth = 100;
                box1.percentHeight = 100;
                box1.minWidth = 100;
                box1.setStyle("backgroundColor", "haloGreen");

                box2 = new Box();
                box2.percentWidth = 100;
                box2.percentHeight = 100;
                box2.minWidth = 100;
                box2.setStyle("backgroundColor", "haloBlue");

                dividedBox = new HDividedBox();
                dividedBox.percentWidth = 100;
                dividedBox.percentHeight = 100;
                dividedBox.addChild(box1);
                dividedBox.addChild(box2);
                addChild(dividedBox);
            }

            private function colorPicker_change(evt:ColorPickerEvent):void {
                dividedBox.setStyle("dividerColor", evt.color);
            }
        ]]>
    </mx:Script>

</mx:Application>