Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabIndex Wrap Around

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
Is it possible to have the last control on a form remain in focus when the TAB, DownArrow, Enter ... is pressed?

Thanks you,
Sam
 
Have you tried putting NODEFAULT in the control's LostFocus?

Or, if that doesn't work (I've never tried it), how about THIS.SetFocus in the LostFocus?

Give them a try, and report back.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Another possibility:

In the control's Keypress event, test to see if the key is Tab, Enter, DownArrow, etc. If it is, issue NODEFAULT.

No doubt others will come up with more ideas.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Mike,

Have you tried putting NODEFAULT in the control's LostFocus?

Or, if that doesn't work (I've never tried it), how about THIS.SetFocus in the LostFocus?
 


Please ignore previous response. It was incomplete.

Hi Mike,

[b]Have you tried putting NODEFAULT in the control's LostFocus?

Or, if that doesn't work (I've never tried it), how about THIS.SetFocus in the LostFocus?
[/b]

Both responses work. However it also disable the up arrow.


In the control's Keypress event, test to see if the key is Tab, Enter, DownArrow, etc. If it is, issue NODEFAULT.

This works fine. It was the "NODEFAULT" that I needed.

Thanks,
Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top