I'm having display issues after using stage.focus. I have a component that I'd like to switch from a button click to textInput as part of the functionality. The highlighted portion of the inputText varies based on the last 'known' (?) size. I've tried invalidating everything I can think of but I must be missing something
If you run this example, and click the radio buttons in order you will see that the focus box of the textInput is set to the size of the last .text value and not its current .text value. If you go in reverse, it appears to work but only because its going from larger to smaller :) <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ private function onClick(str:String):void { inputField.text=str; inputField.invalidateDisplayList(); inputField.invalidateProperties(); inputField.invalidateSize(); invalidateDisplayList(); invalidateProperties(); invalidateSize(); stage.focus=inputField; } ]]> </mx:Script> <mx:TextInput id="inputField"/> <mx:RadioButton label="A" click="onClick('A')"/> <mx:RadioButton label="ABC" click="onClick('ABC')"/> <mx:RadioButton label="ABCasdfasdf" click="onClick('ABCasdfasdf')"/> </mx:Application> Any ideas? ------------------------ 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/