Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pageframes within page not refreshing
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Pageframes within page not refreshing
Miscellaneous
Thread ID:
00527431
Message ID:
00527431
Views:
47
A have a form with a page frame with several pages.

On one of the pages, I have a textbox (for entering a search string) and below that another pageframe with 4 pages, each page containing a grid of a related table.

In the valid event of the textbox I have the following code:

If not empty(Mysearch)
Select Myfile
Set order to code
Seek rtrim(mysearch)
mysearch = space(25)
thisform.txtitem.refresh
thisform.txtcode.refresh
this.parent.refresh
If Lastkey() = 13 && enter key is pressed after search string
return 0 && keep the focus in the search textbox
endif
endif

The problem is that the pageframe contained on this page (below this textbox) does not refresh. It does refresh if I click outside of this textbox on the page.

If I remove the If Laskey() = 13 Endif statement from the above code, then the pages of the pageframe below do refresh correctly. However the focus is lost by the search textbox, and one has to click inside the textbox again to do another search.

I want the focus to remain with the textbox, so that a user can immediately type in the next search string (typically a product code eg 053521 followed by an enter keypress). But with the above code, the textbox works ok, and other fields are refreshed, but not the grids of the pageframe below, each containing a related table. If I then click on the grid, then only does it refresh. This has got me puzzled.

Any help would be appreciated.

Regards
David Wheeldon
Next
Reply
Map
View

Click here to load this message in the networking platform