Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LostFocus problem
Message
 
To
21/10/1998 12:39:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00148958
Message ID:
00148991
Views:
21
>Hello, Bruce
>Thank you for your reply, I already use this method ( Deactivate) but when I insert Page1.SetFocus in this method-first Page2 gets Focus and Page1 doesn't.
>
>Do you have some idea why Page1 doesn't receive Focus again. ( In fact it doesn't lose it)
>
>Thanks,
Galia,

Don't call the page's setfocus, instead assing the page number to the pageframe's activepage property. For example in the deactivate of page 2

IF EverythingIsNotAllRight
THIS.Parent.ActivePage = 2
ENDIF

To keep focus on page 2 until the data is correct. I would also give the user a messagebox to inform them of why their click is being ingored, and put focus into the control you want as in;

IF EverythingIsNotAllRight
MessageBox("You must complete page 2 before moving to another page", 0, ;
"Information")
THIS.Parent.ActivePage = 2
THIS.Text1.SetFocus()
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform