×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Tab stops on a page frame

Tab stops on a page frame

Tab stops on a page frame

(OP)
Is there a way to have the tab stops wrap around the page on a page frame without out stopping on the PageFrame tab.
If I set the PageFrame.TabStop to .F., it doesn't go back to the first tab stop.
The TAB key moves it forward and CTRL-TAB moves it backwards.

Thanks,
Sam

RE: Tab stops on a page frame

Are you sure you are talking about pages in a pageframe? As far as I know, the Page object doesn't have a Tabstop property, and you don't normally use the Tab key to move from page to page. The PageFrame object has a TabStop property, but that doesn't control the tabbing within the pageframe, but rather between the pageframe itself and the other controls.

And I've never heard of CTRL+B being used to tab between pages.

If I've misunderstood the question, my apologies.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Tab stops on a page frame

(OP)
My apologies. I should have written it more clearly.

Is there a way to have it cycle through the controls? I'm talking about TABBING through the controls on a page of the PageFrame and when it gets past the last control, start again at the first one.

Sam

RE: Tab stops on a page frame

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:

THISFORM.SetAll("TabStop", .F.)
THIS.SetAll("TabStop", .T.)


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

RE: Tab stops on a page frame

(OP)
Mike,

Your suggestion not to do it is very sensible. It's simply not worth the trouble.

Thank you.

RE: Tab stops on a page frame

As Mike said if you have a reason for it, you have a reason for it. A click on any control outside of the pageframe causes page deactivate, so there you could add back tabstop to .T. for all outside controls.
If users (or you) want to stick inside the pageframe, the need to get out there should be acceptable. It's just logic you cant stay on a page and move out at the same time, so the rarely necessary action can be made more complicated. ESC would be an idea for that. Within drawing software it's not unusual to have esc as end key of a current tool like drawing a path or polygon, which are tools in a mode you are stuck do repeated steps until going back to point one or ESC. So that wouldn't be too unusual. At least it would make sense, but we don't know the reasoning for your wish about this tab behaviour. I could imagine a multi page form automatically stepping forward a page one you hit a confirm button on pageX, but keeping you in the loop of specifically just the page controls.

The only thing that speaks against ESC is it is the standard key for a button with button.Cancel=.T. just like ENTER is for a button with button.Default = .T., but you might make use of that, if the cancel button is outside the pageframe, for example in a footer area of the form underneath the pageframe, you a) automatically set focus outside of the pageframe and b) can detect in the cancel buttons when event, that it gets triggered for pageframe cancelling and not form cancelling, as it's tabstop is still .F. in that moment.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Tab stops on a page frame

And also keep in mind that, just because a control outside the pageframe has its Tabstop set to .F., that doesn't mean it can't receive focus. It just means that you can't use Tab (or Shift+Tab) to move focus to it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close