Hi Rodney, I can think of 2 possible ways to handle this based on my experience with combo boxes.
1) Fill the data provider in the focusIn event (should work, don't know if it's appropriate for your app.) 2) Create a composite control based on Canvas with a transparent Box over the top of the ComboBox. Then use the click event of the Box to fill the combo's data-provider and call combobox.open() Kind of like: --------------- <mx:Canvas xmlns:mx="..."> <mx:Script> public function get selectedItem():Object { return cbo.selectedItem; } private function rpcFillComplete(event:ResultEvent) { cbo.dataProvider = event.result; cbo.open(); } </mx:Script> <mx:ComboBox id="cbo" x="0" y="0" width="100%" height="100%" editable="false" /> <mx:Box id="trickBox" x="0" y="0" width="100%" height="100%" alpha="0.0" click="callRpcFill()" /> </mx:Canvas> --------------- (above psudo-code will be close, not perfect) I have NOT actually tried this, but I think it will work. This is of course assuming that your combo is not editable. There would be a bit more code than this depending on what you want your combo to do. - Kelly -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff Sent: Friday, June 30, 2006 11:17 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: adding a service to open for ComboBox Hi Rodney, I had a similar problem with a combo box not staying open before. I was using the render event to set focus to another control. It was taking the focus away from the combo box. The combo box ould open and close immediately. Maybe you are doing something similar. -TH --- In flexcoders@yahoogroups.com, Phil Marston <[EMAIL PROTECTED]> wrote: > > Hi Rodney, > > I'm doing something similar, but I'm using a different even to trigger > the population of the dataprovider - I'm guessing this might resolve > your issue. > > If it helps - I find using the creationComplete attribute of the > application tag to call a method (such as initApp()) that populates the > dataprovider works fine for me. > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > creationComplete="initApplication()"> > <mx:Script> > <![CDATA[ > // import this and that > > public var myDataProvider : ArrayCollection; > > public function initApplication(): void > { > //remote service call where myDataProvider = result > } > ]]> > </mx:Script> > > <mx:HBox> > <mx:ComboBox id="cb" dataProvider="{myDataProvider}" /> > </mx:HBox> > > </mx:Application> > > HTH > > Phil > > > rodneyjlucas wrote: > > Hello, > > > > I would like to use a comboBox whos contents will be filled in > > dynamically. The open command would trigger a remote call and fill in > > the data provider of the comboBox. This all works fine except that > > when you click on the pulldown it will close it before you get a > > chance to select anything. > > > > I have tried executing an the combobox.open() method but it still > > won't stay open. Does anyone know what I might be missing? > > > > Rodney > > > > > > > > > > > > > > -- > > 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 > > > > > > > > > > > > > > > > -- > ______________________________________________________________ > Phil Marston > Learning Technologist > Learning Technology Unit > Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK > [EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 > http://www.abdn.ac.uk/diss/ltu/pmarston/ > http://www.abdn.ac.uk/diss/ltu/ > ______________________________________________________________ > > The University of Aberdeen Open Day 29th August 2006 Booking is > essential www.abdn.ac.uk/openday email [EMAIL PROTECTED] > or call 0800 027 1495 > ------------------------ Yahoo! Groups Sponsor --------------------~--> Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/