>I'm building a class which is a container of other objects. I capture the keystrokes ('cause I want to do specific things). When the user hits the TAB key, I want to move on to the next object on the form (one that can actually receive focus). How the heck do I do that? I tried
.Parent.Objects(This.TabIndex+1).SetFocus, but if the next object is something like a shape that doesn't have a SetFocus event, I get an error.
>
>I just know that this is going to be a simple answer, and you all will think me a complete moron, but please be gentle!
>
>Thanks
Valerie, try this:
IF nKeyCode = 9 && TAB
thisform.mycontainer.ENABLED = .F.
*since the container is disabled the focus goes to the first available control
KEYBOARD '{TAB}'
thisform.mycontainer.ENABLED = .T. && enable it again
ENDIF
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison