Using the DropDownList in Flex Gumbo

by Peter deHaan on March 7, 2009

in DropDownList, beta

The following example shows how you can use the new Flex Gumbo DropDownList/ComboBox control to display a list of options.

Full code after the jump.

To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see “Using the beta Gumbo SDK in Flex Builder 3″.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/03/07/using-the-dropdownlist-in-flex-gumbo/ -->
<s:Application name="DropDownList_test"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo">
    <s:layout>
        <s:BasicLayout />
    </s:layout>

    <s:DropDownList id="comboBox"
            horizontalCenter="0"
            top="20">
        <s:dataProvider>
            <s:ArrayList source="[The,quick,brown,fox,jumps,over,the,lazy,dog]" />
        </s:dataProvider>
    </s:DropDownList>

</s:Application>

This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.

{ 2 comments… read them below or add one }

1 Hernan March 8, 2009 at 5:29 pm

Hi, Why dont upload the example running like other examples

Reply

2 Peter deHaan March 8, 2009 at 5:39 pm

Hernan,

The Gumbo posts will all need to be updated after the Fx prefix is removed. So I didn’t want to create/upload a bunch of SWFs and then recreate them all in the future. I’m planning on adding SWFs to these older examples (time permitting) when I update them all later after the big API renaming. For more information on the “Dropping the Fx Prefix” page on the Flex Gumbo page on the opensource.adobe.com website.

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: