how about this ultra simple example:

for(var i:int=0;i<10;i++){
    cb.dataProvider.addItem( i );
}

this will add 10 items to the combox.

cb.dataProvider will return the collection it holds,  be it an Array, ArrayCollection or XMLList....

Jeremy.


On 6/18/06, Tim Hoff <[EMAIL PROTECTED]> wrote:

I agree Mike,

List-based controls were built with the idea that people will use
data providers. You have to populate the list with something. How
you do it, is up to you (data driven or hardcoded).

-TH


--- In [email protected], "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> > Most controls were built with the idea that people will use
dataBinding
> only.
>
> That is not true, learn how to use collections.
>
> Peace, Mike
>
> On 6/17/06, Tim Hoff <[EMAIL PROTECTED]> wrote:
> >
> > Look here:
> >
> > http://groups.yahoo.com/group/flexcoders/message/39987?l=1
> >
> > -TH
> >
> >
> > --- In [email protected], "NZEYIMANA Emery Fabrice"
> > <nzeyimana@> wrote:
> > >
> > > Hello, thanks for the help.
> > > But I have admit that I am still confused.
> > > Do you have a code snippet for me to look at?
> > > Everything looks terribly new to me in Flex. Most controls
were built
> > with the idea that people will use dataBinding only.
> > > As I am learning Flex, I will probably be putting a question
every 50
> > minutes. Also, the Yahoo Forums are not easy to dig.
> > >
> > >
> > >
> > > Thanks
> > > Emery
> > >
> > > ----- Original Message -----
> > > From: Michael Schmalle
> > > To: [email protected]
> > > Sent: Saturday, June 17, 2006 19:19
> > > Subject: Re: [flexcoders] Adding ComboBox Item programmatically
> > >
> > >
> > > Hi,
> > >
> > > You can access the comboBox.dataProvider as an ICollectionView.
> > >
> > > See the docs about this interface and the IViewCursor
> > >
> > > Peace, Mike
> > >
> > >
> > >
> > > On 6/17/06, NZEYIMANA Emery Fabrice nzeyimana@ wrote:
> > >
> > > Hello group,
> > >
> > > Is there any way of adding an item to the combo box
programmatically?
> > > I hate data binding and try to avoid it as much as I can.
> > > Like in .NET one can access the Items property of the combo
box.
> > >
> > >
> > > Thanks
> > > Emery
> > >
> > >
> > >
> > >
> > > --
> > > What goes up, does come down.
> > >
> >
> >
> >
>
>
>
> --
> What goes up, does come down.
>


__._,_.___

--
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