Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: Enter on TextBox triggers Command.Click
Thread ID: 365621 Message ID: 365653 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Saturday, December 29, 2012 7:15:35 AM         
   


> Colleagues,
>
> I've never seen such behavior: I hit Enter on a data entry box - and it triggers Click event on a Command button - how comes?!
>
> I made this button (and all other ones) non-TabStoppable - and it still does it!
> I put in the following code
>
>
IF m.nKeyCode==13
>    THIS.SetFocus
> ENDIF ()

> into this textbox's KeyPress event - and it still does it! :-@
>
> Where am I to look for the cause of this behavior?
>
> Regards,
>
> Ilya

Move the parenthesis after ENDIF one line up, the code block will look better. And who knows it will solve your problem? :-U

Regards
Samir

ENTIRE THREAD

Enter on TextBox triggers Command.Click Posted by Ilya Rabyy @ 12/28/2012 6:30:21 PM
RE: Enter on TextBox triggers Command.Click Posted by Rick Hodgin @ 12/28/2012 6:51:19 PM
RE: Enter on TextBox triggers Command.Click Posted by Ilya Rabyy @ 12/28/2012 7:42:18 PM
RE: Enter on TextBox triggers Command.Click Posted by David Mustakim @ 12/28/2012 11:53:16 PM
RE: Enter on TextBox triggers Command.Click Posted by tushar @ 12/29/2012 5:23:08 AM
RE: Enter on TextBox triggers Command.Click Posted by Samir H. @ 12/29/2012 7:15:35 AM