Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with setting focus in PageFrame
Message
From
01/12/1999 17:58:19
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
To
01/12/1999 16:51:35
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00297513
Message ID:
00297621
Views:
24
>I have no idea why the Enter key would set focus to the Page tab, but you can not allow focus to go to a Page tab by setting the Pageframe Tabstop property to .F.

Thanks John. I had tried to DISABLE the page tab (and that didn't help), but YES, your suggestion prevents focus from going to the page tab, but now the focus is nowhere to be seen...every control on the page (including all buttons) has a StatusBarText, and the status bar shows the default message (DB and table name . . . record #/# . . . record unlocked).

There is a disabled "Modify" button that has the heavy border, so VFP sets that button to be the default (I don't, explicitly), whether the last button pressed was "Add" or "Modify". The way I understand it, Enter invokes the default button, so maybe since it's disabled, VFP doesn't know what to do/where to "go".


>By the way, avoid using the brackets for key names in the future. The HTML tag processor rendered the post almost unreadable because of them.
Thanks for the heads up on that (and for clearing them out of the message).

J
>
>
>>Hello all,
>>
>>I have a form w/a page frame with 3 tabs. I am having trouble when the user ends a text box entry w/the Enter key, instead of Tab. When Tab is used,
>>the focus, appropriately, goes to the next input object. When Enter is used, the focus goes to the page TAB.
>>
>>I've been looking for things that control how keys are interpreted and I have:
>>SET COMFIRM OFF
>>SET KEYCOMP WINDOWS
>>I have no buttons with a DEFAULT property of .T.
>>
>>Hacker's tells me that:
>>
>>"In Windows, Enter chooses the default button. (Be aware that any button that has focus becomes the default button. When focus moves to an object other
>>than a button, the button whose Default property is .T. once again becomes the default. In other words, when a button has focus, pressing Enter chooses
>>that button, no matter which button is designated as the default.)"
>>
>>I think this is where my problem is...and changing KEYCOMP to DOS actually does solve that specific problem, but I think, for other reasons, it's better to use KEYCOMP set to WINDOWS, yes?
>>
>>Some additional details:
>>
>>The data Page1 and Page2 are controled by the same set of buttons, FormBtns; Page3 has it's own set of buttons, Page3Btns.
>>
>>The objects are set up as follows:
>>Form
>>  |
>>  |-----FormBtns
>>  |
>>  |-----PageFrame
>>                 |
>>                 | Page 1
>>                 |
>>                 | Page 2
>>                 |
>>                 | Page 3
>>                        |
>>                        | Page3Btns
>>
>>In the activate/deactivate of Page 3 I set FormBtns to visible/not, enabled/not.
>>
>>I suspect that when leaving a text box in page 3, somehow the "default" button is in FormBtns? and since they are invisble and disabled, focus gets set to the page tab instead of the next object on the page.
>>
>>I even tried to put a RETURN 1 in the VALID of the textbox...same effect when leaving w/an Enter.
>>
>>Or maybe something else is happening that I'm missing.
>>
>>Input/advice is appreciated. TIA!
>>
>>J
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform