Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pageframes within page not refreshing
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00527431
Message ID:
00527515
Views:
19
I have tried each of the suggestions from Renior & Edgar, but neither worked.

I now managed to get the pageframe to refresh correctly. By draging a grid of Myfile.dbf onto the same page that contains the smaller pageframe with grids, has somehow allowed the original code to work perfectly!!?.(I have set this new grid's property to visible = .F. and sized it very small) Now when a code is typed in the textbox and enter is pressed, the pageframe & grid within that page also refreshes immediately. The focus stays in the textbox so another search string can be typed straight away.

Don't ask me how or why this works, but it does.

Regards David

>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
Previous
Reply
Map
View

Click here to load this message in the networking platform