Thanks Benoit,
That is better than entering the dataProvider twice. I'm being nitpicky, but I'd rather have a self-reference - so that I don't have to change either the id or the dataProvider string twice if I reuse or change the code. Something like event.target for events.
 
But id is less likely to change than the dataProvider, so this is a step in the right direction.
 
Thanks for the suggestion,
Derek
 
 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of Benoit Hediard
Sent: Friday, September 29, 2006 10:31 AM
To: [email protected]
Subject: RE: [flexcoders] rowCount = {dataProvider.length}

You can do it like this:
<mx:ComboBox id="myCombo"
dataProvider="{myDataProvider}"
rowCount="{myCombo.dataProvider.length}"/>

Benoit Hediard

-----Message d'origine-----
De : [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] De la
part de flex-guitar
Envoyé : vendredi 29 septembre 2006 15:57
À : [EMAIL PROTECTED]ups.com
Objet : [flexcoders] rowCount = {dataProvider.length}

Hello everyone,
I'm trying to set several ComboBoxs to show their dropdown without
scrolling. There are a few posts in the archive suggesting to set the
rowCount to the dataProvider.length :

<mx:ComboBox id="MyCombo" dataProvider="{MyDataProvider}"
rowCount="{dataProvider.length}"/>

but I get an compile error ("undefined property 'dataProvider'")

This makes sense, since dataProvider isn't a property of my app, just of
this component. But I'd rather not type in the dataProvider name again, I'd
rather reference it. Do components have a self-reference that can be used in
their own bindlings? i.e.:

rowCount ="{thisCompont.dataProvider.length}"

or do I have set each one directly:
rowCount="{MyDataProvider.length}"

Thanks,
Derek

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



__________ NOD32 1.1783 (20060929) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com
__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to