Docking an ApplicationControlBar container

by Peter deHaan on August 25, 2007

in ApplicationControlBar

The following example shows how you can dock an ApplicationControlBar container by setting its dock property to true. Yes, this is perhaps the shortest and most boring example ever. Enjoy!

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/25/docking-an-applicationcontrolbar-container/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:ApplicationControlBar dock="{checkBox.selected}">
        <mx:CheckBox id="checkBox" label="dock" />
    </mx:ApplicationControlBar>

</mx:Application>

View source is enabled in the following example.

{ 2 comments… read them below or add one }

1 DCHall September 7, 2007 at 9:47 am

First I have to say, you rock for posting these examples. I have been doing web development for 6 years and have worked on an off in Flash during that time. So I know a lot of the basics but I am more of a design guy. I have now been pushed to work with flex/air for a couple of projects when I came across your site. Great example walkthrough’s! Your site alone has got me up and running in a short time.

Now to my question… Would this example also work docking if you we not using flex chrome/window or windows chrome. Example. I am making an application that would basicly dock to the top/screen or taskbar on launch. Then when clicking the control bar a canvas will slide up or down depending on location on screen. I hope I am explaining that right.

Reply

2 peterd September 7, 2007 at 9:56 am

DCHall,

I haven’t had a chance to play with AIR very thoroughly yet and haven’t tried doing that yet.

Sorry,
Peter

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: