Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page Frame don't get focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00567800
Message ID:
00567858
Views:
15
I use the THISFORM.MyPageFrame.ACTIVEPAGE = 2

To set the page I want the user to go to. Have you read up on or used ActivePage?

>Hi group,
>
>In VFP 6.0 I have a form which uses a pageframe with 5 pages.I'm adding caption with accelaration keys to each pages (ex: \>
>When I'm in a page and click a letter (D for example) the 'Detail page' appears but the cursor stay in the field where it was in the other page.
>
>
>I tried to work around the problem by adding code to the accivate event of each page. The code I'm adding is this:
>
>** This section of code was there from a long time, I don't recall the reason
>** it must fix some other problem but ??
>llLock = ThisForm.lockscreen
>thisform.lockscreen = .T.
>this.refresh()
>thisform.lockscreen = lllock
>
>** This section I added today trying fixing my problem
>do case
> case empty(field 1 outside the page frame)
> field 1.setfocus()
> case empty(filed 2 outside the page frame)
> filed 2.setfocus()
> otherwise
> this.setfocus
>endcase
>
>return dodefault()
>
>
>
>
>
>The result is not really acceptable. When I open the form the cursor is in 'limbo' even if I force filed1.setfocus() in the init of the formset. To get the cursor back I have to press tab or down arrow. After that it works fine, meaning the ursor gets in the right place when I use any accelerator keys.
>
>
>I start to think I'm going toooooo complicate. I just want to have accelerator keys working on page caption? any ideas?
>
>
>Diane Robitaille eng.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform