If you set focus to the button, then your text input will lose focus and the 
user won't be able to type. 

But the dialog should close automatically when the user presses Enter. Is that 
not happening?

On Jun 8, 2011, at 10:24 AM, noobmike wrote:

> Hey guys, 
> 
> I have two push buttons in an open Dialog for a simple user login. Buttons
> are Login and Close. 
> I want to set the focus(for my lack of knowing the actual term) onto the
> Login button, so the 
> user can type in their user name (hit tab to the password field) enter the
> password and click
> enter to login rather than having to mouse over to the Login Button. My BXML
> code is as follows:
> 
> <TablePane.Row height="-1">
>         <BoxPane orientation="horizontal"
> styles="{horizontalAlignment:'right'}">
>                <PushButton bxml:id ="loginButton" buttonData="Login"
> 
> ButtonPressListener.buttonPressed="loginWindow.close()"/>
>               <PushButton bxml:id ="closeButton_loginWindow" 
> buttonData="Close"
> 
> ButtonPressListener.buttonPressed="loginWindow.close()"/>                     
>         
>       </BoxPane>              
> </TablePane.Row>
> 
> I assume its as easy as a selected = "true" or something along those lines,
> but am not sure. 
> 
> Thanks, 
> 
> Mike.
> 
> --
> View this message in context: 
> http://apache-pivot-users.399431.n3.nabble.com/Setting-Push-Button-Focus-tp3039282p3039282.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Reply via email to