Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Phantom Phocus - SetFocus()
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00931166
Message ID:
00931168
Views:
21
>My client wanted a button to go to the 2nd page of a 2-page pageframe. So, I gave them a button that calls the click event of the 2nd page. I also added a SetFocus() function to the first field in the Tab order after the .PAGE2.CLICK() procedure.
>
>What is odd is that the first textbox is highlighted, but there is an underline or line wrapped around the PageFrame's Page2 Tab area where the name of the Page is located. It seems that the focus is not really on the first TextBox; to get the focus *really* on the first textbox requires a couple hits on the ENTER key.
>
>Is there any way to get around this oddity? I was thinking about doing a KEYBOARD of the ENTER or TAB keys following the SetFocus().

You need to activate the proper page before you set focus.
thisform.PageFrame.ActivePage = 2
thisform.Pageframe.Page2.TextBox.SetFocus()
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform