The prompt element can't be selected directly from the combobox control itself, but it _can_ be selected programmatically by setting the combobox's selectedIndex to -1 from, say, the click handler of a reset button. Sometimes that's a good fit, sometimes maybe not so good, but it's one more alternative.
--- In flexcoders@yahoogroups.com, "Ralf Bokelberg" <[EMAIL PROTECTED]> wrote: > > There is a little difference though. In contrast to a real element the > prompt element can not be choosen by the user. Once the user has choosen > something from your combo, she cannot go back to the default state. > > Cheers, > Ralf. > > On 12/12/06, stephen50232 <[EMAIL PROTECTED]> wrote: > > > > --- In flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com>, "Clint > > Tredway" <grumpee@> wrote: > > > > > > there is an attribute called prompt for a combo box. use that to > > place that > > > text as the first line... now it will disappear once a selection is > > made. > > > > > > On 12/12/06, Van De Velde Hans <hans.vandevelde@> wrote: > > > > > > > > Either you include the first element in the CFCs (in a centralized > > > > way for all), > > > > or you add a result handler in ActionScript and add a first > > element in the > > > > result handler, > > > > or you extend the ComboBox to automatically add a first element. > > > > > > > > There are always many ways to do something, > > > > it's just up to you to evaluate which solution seems the best > > suited and > > > > the most maintainable. > > > > > > > > > > > > > > > > -----Original Message----- > > > > *From:* flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com> > > [mailto:flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com>] *On > > > > Behalf Of *stephen50232 > > > > *Sent:* dinsdag 12 december 2006 14:54 > > > > *To:* flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com> > > > > *Subject:* [flexcoders] Re: Default value for combo boxes > > > > > > > > --- In flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com><flexcoders%40yahoogroups.com>, > > Van De > > > > Velde Hans > > > > <hans.vandevelde@> wrote: > > > > > > > > > > Usually, I just add a first element in the dataProvider of the > > ComboBox. > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com><flexcoders%40yahoogroups.com> > > [mailto: > > > > flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com><flexcoders%40yahoogroups.com>] On > > > > > Behalf Of stephen50232 > > > > > Sent: dinsdag 12 december 2006 12:48 > > > > > To: flexcoders@yahoogroups.com <flexcoders% 40yahoogroups.com><flexcoders%40yahoogroups.com> > > > > > Subject: [flexcoders] Default value for combo boxes > > > > > > > > > > > > > > > > > > > > HI, > > > > > > > > > > Is there a property for the combo box component for a default value; > > > > > for example I want to insert "Please select..." in the top row of my > > > > > data bound combo boxes, which I thought would be a standard thing to > > > > > do, but I can't see the property you set for this default value. > > > > > Can anyone point me in the right direction? > > > > > > > > > > Thanks > > > > > > > > > > Stephen > > > > > > > > > How do you do that? My data provider is the event.result from a call > > > > to a CFC method. > > > > > > > > > > > > > > > > > > > > > > > > -- > > > http://indeegrumpee.spaces.live.com/ > > > > > Thanks, that's exactly what I was looking for. > > > > > > > > > > -- > Ralf Bokelberg <[EMAIL PROTECTED]> > Flex & Flash Consultant based in Cologne/Germany >