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?