Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrow Keys Don't Fire When, GotFocus, Click in Grid txtB
Message
From
12/02/2002 12:02:36
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00618623
Message ID:
00618911
Views:
21
Chuck,

Sorry, been a long night (beta testing... ahhh)... personally, in the form in question (myForm), open in design mode, goto Form, New Method, then create 'chucks_keypress' method...

In the 'chucks_keypress' method, I would fire the click() event in question with something like
THISFORM.activecontrol.click()
In the myform.keypressevent, I would define the circumstances to fire the new method..
IF TYPE("THISFORM.ActiveControl") == "O" AND UPPER(THISFORM.ActiveControl.BaseClass) <> "GRID"
*-- If on an active object, and the object is the grid in myForm...
   IF INLIST(LAST(), leftarrow, rightarrow... leftclick...)
      *-- IF the last keys pressed were some of the cursor keys leftarrow, rightarrow... 
      *-- don't forget TAB, SHIFT+TAB as well...
      chucks_keypressevent() && fire the new method we created
   ENDIF
ENDIF
HTH

Ric

>Hello,
>
>OK, I'm still not getting the significance of _activeform.keypress(). Are you saying to open my form in design mode, open the properties box, go into the KeyPress Event and create a [User Procedure] there that contains the code?
>
>Thanks for your continued help. Chuck
>
>>Hello,
>>
>>Okay, try it with cleaner 'coding' lol... I did apologise in a later message...
>>
>>In the _activeform.keypress() Event you would have the code:
>>
>>PRE
>>IF TYPE("THISFORM.ActiveControl") == "O" AND UPPER(THISFORM.ActiveControl.BaseClass) <> "GRID"
>> IF INLIST(LAST(), leftarrow, rightarrow... leftclick...)
>> chucks_keypressevent()
>> ENDIF
>>ENDIF
>>/PRE
>>
>>The "O" means we are on an object, just a habit I got in of insuring everything works...
>>
>>HTH
>>
>>Ric
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform