Aaaah. Managed mix up my args; seems to work OK now. Sorry.<br>Ken<br><br><div class="gmail_quote">On Mon, Feb 22, 2010 at 3:55 PM, Ken MacDonald <span dir="ltr"><<a href="mailto:drken567@gmail.com">drken567@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>I've inherited an I-P app, and trying to make some sense of it... It has a login page, with several text fields including "user" and "password"; and "Oed to K" and "CANCEL" buttons. Right now, you enter the user/password into the text fields, and then have to click the "OK" button to login. Customer would like this to work like most other apps, where filling in user/password and then typing the "Enter" key would also initiate the login. I've searched the I-P book and googled, but I can't find a workable reference to how to write a handler to determine the Enter key has been hit - actually, I was able to catch a keyboard event:<br>
<br>pwd_fld.KeyDown += on_enter<br><br>def on_enter(self, e, args)<br> # what here???<br><br>but unable to determine what the keystroke is - "Iron Python In Action" suggests:<br><br>if e.Key == Key.Enter:<br>
# start login<br><br>but I get the error "e has no attribute 'Key'"<br><br>Clues appreciated....<br><font color="#888888">Ken<br>
</font></blockquote></div><br>