I am encountering this same problem, namely that the defaultButton feature doesnt work inside a tabnavigator.
Is this confirmed as a known bug, and is there a work around? Hank On 8/15/06, Sergey Kovalyov <[EMAIL PROTECTED]> wrote: > Hi All! > > I have simple application. Authentication form with Sign in button > assigned as defaultButton. The source is available below: > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > horizontalAlign="left"> > > <mx:Script> > <![CDATA[ > > import mx.controls.Alert; > > private function onSignInButtonClick() : void { > Alert.show("Sign in clicked"); > } > > ]]> > </mx:Script> > > <mx:Form defaultButton="{signInButton}"> > <mx:FormItem label="Username:"> > <mx:TextInput /> > </mx:FormItem> > <mx:FormItem label="Password:"> > <mx:TextInput displayAsPassword="true" /> > </mx:FormItem> > <mx:FormItem> > <mx:Button id="signInButton" label="Sign in" > click="onSignInButtonClick()" /> > </mx:FormItem> > </mx:Form> > > </mx:Application> > > > > When you set focus on any TextInput instance inside the form and click > Enter, alert window is shown. But when I put form into the > TabNavigator container, this does not work. Look at the code below: > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > horizontalAlign="left"> > > <mx:Script> > <![CDATA[ > > import mx.controls.Alert; > > private function onSignInButtonClick() : void { > Alert.show("Sign in clicked"); > } > > ]]> > </mx:Script> > > <mx:TabNavigator> > <mx:Form label="Authentication form" > defaultButton="{signInButton}"> > <mx:FormItem label="Username:"> > <mx:TextInput /> > </mx:FormItem> > <mx:FormItem label="Password:"> > <mx:TextInput displayAsPassword="true" /> > </mx:FormItem> > <mx:FormItem> > <mx:Button id="signInButton" label="Sign in" > click="onSignInButtonClick()" /> > </mx:FormItem> > </mx:Form> > </mx:TabNavigator> > > </mx:Application> > > > > What is wrong with this? > > Regards, Sergey. > > > -- > 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 > > > > > -- 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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> 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/

