Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's different between Ctrl-tab and click to a page
Message
From
21/08/2007 06:08:56
 
 
To
21/08/2007 05:58:54
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01249290
Message ID:
01249303
Views:
16
>>>Hi,
>>>
>>>I have a form with a pageframe and 3 pages, in page1's ACTIVATE event I have
>>>
>>>This.edtBox1.SetFocus()
>>>
>>>so that each time the page is brought on top, the EDITBOX edtbox1 will be selected automatically.
>>>
>>>I get what I want when
>>>1) The form is intially launched.
>>>2) If I click to page1 from another page.
>>>
>>>But if I press Ctrl+Tab to switch to page1 from another page, the edtBox1 won't get focus!
>>>when I use the keyboard to switch to that page why is it different from mouse click or am I doing something wrongly?
>>
>>Have you tried:
>>
>>In the GotFocus() event of Page 1:
>>
>>This.edtBox1.SetFocus()
>>
>>so that every time page 1 gets the focus, either from clicking its tab, or hot-keying to it, it passes on the focus to the editbox.
>
>A page does not have gotfocus, for whatever reason....

Yeah, you're right. I meant the Activate() event.

I was looking at a non-paged form and saw the GotFocus() - Du-UH! :-)

When you say "for whatever reason...." I assume you mean "I can't understand why - as it would be a good idea"
Trouble with using the Acivate() is that it tends to fire a lot when other objects on the page get focus, etc. (at leats that's what happens, VERY annoyingly, in debug, when you're trying to step through proceedings.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform