What about: <mx:TextInput id="phoneNumberInput" focusEnabled="false" />
Adam ----- Original Message ----- From: acooleagle To: flexcoders@yahoogroups.com Sent: Saturday, February 10, 2007 8:51 AM Subject: [flexcoders] Re: TextInput - Incorrect focus behavior Thanks for responding - TextInput does not have a property "selectable" ... My intention is that I don't want the user to be able to leave the field until a certain value has been entered. --- In flexcoders@yahoogroups.com, "superstella_uk" <[EMAIL PROTECTED]> wrote: > > --- In flexcoders@yahoogroups.com, "acooleagle" acooleagle@ wrote: > > Cant you just set the TextField.selectable = false ? > > > > > > > Hi all, > > > > Seems to me that focus events in TextInputs are a bit out of whack. > > > > The test application below should never allow focus on the > > phoneNumberInput field, since its "focusIn" event immediately redirects > > focus back to the zipcodeInput field. > > > > However, the zipCodeInput field remains "active" (as indicated by the > > blue highlight) the phoneNumberInput retains the prompt (!!). > > > > This is a major problem for us as we would like the focus and the prompt > > to stay in the active field on occasions where the content of the field > > is invalid. > > > > As far as I am concerned this weird focus/prompt behavior is a bug. > > > > $5 million question now is : does anybody know a workaround? > > > > Thanks for all feedback, > > > > = Dirk > > > > > > > > <?xml version="1.0"?> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> > > > > <mx:Form> > > <mx:TextInput id="zipCodeInput" /> > > <mx:TextInput id="phoneNumberInput" > > focusIn="zipCodeInput.setFocus()" /> > > </mx:Form> > > > > </mx:Application> > > >