Peter - this is exactly what I was looking for. Thanks!

On 6/6/06, Peter Watson <[EMAIL PROTECTED]> wrote:

Hi Will,

 

There is also a "prompt" attribute for the mx:ComboBox component that may be what you are looking for. 

That way you don't have to modify the dataProvider and once a selection is made the prompt doesn't show again.

 

<mx:ComboBox dataProvider="{cards}" prompt="Please Select a Card Type"…>

 

 

If you always want the prompt value to be in the list then go with Stacey's approach.

 

regards,

peter

 


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Will Morgan
Sent: Tuesday, June 06, 2006 9:26 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] ComboBox default label.

 

Joshi - thanks, but that wasn't quiet what I was looking for. Stacey - that kinda works, but I need to tweet it a little - thank you for the pointer!

Will.

On 6/6/06, Ranadheer Reddy < [EMAIL PROTECTED]> wrote:

Hi


simple example of the combobox given below :
<?xml version="1.0"?>    <mx:Application xmlns:mx="

http://www.adobe.com/2006/mxml">        <mx:Script>          <![CDATA[                [Bindable]              
public var cards: Array = [ {label:"Hyperion", data:1},                   {label:"August technologies", data:2}, {label:"VoIP Services", data:3} ];

                        [Bindable]              public var selectedItem:Object;                  ]]>      </mx:Script>        <mx:Panel title="ComboBox Control Example" height="75%" width="75%"           paddingTop="10" paddingLeft="10">            <mx:HBox>              <mx:ComboBox 

dataProvider="{cards}" width="150"                   change="selectedItem=ComboBox(event.target).selectedItem"/>                <mx:VBox width="250">                  <mx:Text text="Select a type of CreditCard."


 width="200"/>                  <mx:Label text="You selected: {selectedItem.label}"/>                  <mx:Label text="Data: {selectedItem.data}"/>              </mx:VBox>                   </mx:HBox>      </mx:Panel>        </mx:Application>

regards

Joshi Pattabhi

Hyperion Technologies (Flex Team)


willmorganuk < [EMAIL PROTECTED]> wrote:

Hi All,

Any idea how I can add the usual "Select An Item" as the first label
to a comboBox? The labels are from a webservice and I'm using
lableField="GAL_NAME" so there isn't one available to me. How do I add
that into the dataProvider?

Any help appreciated. Thanks, Will.

 


How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.

 


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to