Setting the header height on a Flex TitleWindow container

by Peter deHaan on March 25, 2008

in TitleWindow

The following example shows you how you can change the header height on a TitleWindow container in Flex by setting the headerHeight style.

Full code after the jump.

<?xml version="1.0" encoding="utf-8"?>
<!--  -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:ApplicationControlBar dock="true">
        <mx:Form styleName="plain">
            <mx:FormItem label="headerHeight:">
                <mx:HSlider id="slider"
                        minimum="24"
                        maximum="64"
                        value="32"
                        snapInterval="2"
                        tickInterval="4"
                        liveDragging="true" />
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>

    <mx:TitleWindow id="titleWindow"
            title="The quick brown fox jumped"
            status="{titleWindow.width}x{titleWindow.height}"
            titleIcon="@Embed('assets/TitleWindow.png')"
            showCloseButton="true"
            headerHeight="{slider.value}"
            borderColor="haloBlue"
            borderAlpha="1.0"
            width="400"
            height="150">
        <mx:VBox id="vBox" width="100%" height="100%">
            <mx:Label text="{vBox.width}x{vBox.height}" />
        </mx:VBox>
    </mx:TitleWindow>

</mx:Application>

{ 1 comment… read it below or add one }

1 liguojun June 3, 2008 at 6:50 pm

very good!

Reply

Leave a Comment

Sorry, this blog is terrible at eating HTML comments.
If you're pasting any HTML/XML/MXML code, you need to convert your < characters to &lt; and your > characters to &gt; .

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Anti-Spam Protection by WP-SpamFree

Previous post:

Next post: