Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoid having pageframe on TAB #1
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00016833
Message ID:
00017025
Views:
86
>>Michel, I have read somewhere that in VFP 5 the page itself can have a focus now. May be that's the case?
>
>But, as I mentioned, I tried TabStop=.F. and it didn't help.
PROCEDURE SetFirst
* Sets focus to control with earliest TabIndex

LPARAMETER toWhich
LOCAL loCtl, loPag

IF PCOUNT() < 1
    toWhich = thisForm	
ENDif

FOR EACH loCtl IN toWhich.Controls
    WITH loCtl
        IF .TabIndex = 1
            .SetFocus()
            EXIT
        ENDif
        IF UPPER(.baseClass) = "PAGEFRAME"
            FOR EACH loPag IN .Pages
                IF  loPag.PageOrder = .ActivePage
                    thisForm.SetFirst(loPag)
                ENDif
            ENDfor
        ENDif
    ENDwith
ENDfor
ENDproc
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform