Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress and Tabbing
Message
From
05/01/2009 09:30:26
 
 
To
05/01/2009 09:27:25
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01370992
Message ID:
01371001
Views:
28
>>>Is there a way to force the focus to go to the next object in the KeyPress event of a textbox if TAB is pressed? nKeyPress = 9, but what do I do to make it jump to the next object on the form?
>>
>>You can use SetFocus and Nodefault, e.g.
>>
>>If nKeyCode=9
>>  Thisform.Control1.Setfocus
>>  Nodefault
>>Endif
>>
>
>How do I know what the next control is? If the textbox has a TabOrder of 13, how do I get it to setfocus to the control with a TabOrder of 14?

You can search controls for appropriate TabIndex property, though if you want to move to the next control in tab order then simple Tab key will do it just fine, i.e. no SetFocus required.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform