>>Hi,
>>
>>My pageframe has two pages, one that lets the user choose reports to be printed and the a second with information that has to be computed. The problem is that it takes some time to compute the information on page 2. The question is how do I (1) activate page 2 _before_ I start the computation, (2) do the computation and (3) display the computation, all with only one click of the user.
>>
>>I've tried
>>(1) ...Page2.activate
>>(2) a Compute button click that ...ActivePage=2.
>>
>>In both I refresh the screen and the page (unlock and lockscreen), but the screen is frozen on page 1 until my computation is finished.
>>
>>Help...
>>
>>Marc
>
>Marc, this is definitly an interesting problem. I finally managed to make it refresh the screen correctly before starting my 'computations', EXCEPT that the page tab stayed at page 1. All the data showed correctly for Page 2, just the pagetab was wrong.
>
>Hope someone else is smarter :-)
>
>Barbara
I have recently attempted to tackle the same problem. My approach, which works fine except for one little glitch... uses a timer. On the pageframe.activate, I enable a timer that performs the computations and displays the results on the page, after the screen has been active for 1 second. (Interval = 1000, active = .F.). At the end of the code in the timer event is this.enabled = .F.. This gives the page a chance to load and become active before the computations take place (I chose a timer because I didn't know of an event that takes place after the activate event. This works great except that I can't get the timer to disable itself after it executes the code. this.enabled = .F. as the last line of the timer event code seems to have no effect. This causes the computations to be performed over and over. Anyway, I hoper this posting can serve as both a hint and a question. Tip: use a timer. Question: How do I use a timer? :-)
Erik
Erik Moore
Clientelligence