OK, so I think I get what you are saying now, Sam.
The problem is that, when you are tabbing through the controls
within a page of the pageframe, when you tab away from the last control, focus moves to the next control
outside the pageframe. You want the focus go to the first control on the same page. Have I understood that correctly?
If so, this is of course the expected behaviour. There is no single property or setting that would prevent it. The only solution that comes to mind is to disable tabbing to every control on the form
except those on the current page. And the easiest way to do that would be to set the Tabstop property to .F. for every control on the form that has that property, and then to set it to .T. just for the controls on the current pageframe.
So, in the page's Activate, you could do something like this:
[tt]
THISFORM.SetAll("TabStop", .F.)
THIS.SetAll("TabStop", .T.)[/tt]
Then, in the page's Deactivate, set all the tab stops to .T.
That would achieve what you want. When you hit Tab on the last control, focus will go to the first control on the page (and hitting Shift+Tab moves focus in the opposite direction). But it's a rather crude approach because it doesn't take account of any controls that were previously set to non-tabbable. But at least it will give you something to work on.
Personally, I would not want to do this, because it establishes a behaviour which is different from what the user is expecting. But I suppose you have a good reason for wanting to do it.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads