timeout |
Post Reply |
Author | |
minnen
Newbie Joined: 18 March 2007 Location: Belgium Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 21 January 2008 at 2:05am |
We have a form with two reportcontrols on it. One for the master tabel and one for the detail.
When the user selects a Master the selectionchanged trigger is fired and there we lookup the detaillines for the selected master and show them in the detail reportcontrol.
This works fine.
What i want to avoid is that when the users scrolls down very vast, the trigger is fired everytime (which requires a lot creates, deletes, databaseaccess,....).
Is their a way to 'postpone' the trigger for a certain number of milleseconds? So the trigger would only be fired if the user stays on the same line for lets say 250 milliseconds?
If not, any other ideas how to do this?
Thanks in advance.
|
|
wlcabral
Groupie Joined: 25 April 2007 Location: Brazil Status: Offline Points: 72 |
Post Options
Thanks(0)
|
The Basic idea is: Move the code in selectionChanged to a Timer Control and set this timer in selectionChange event. Something like : in Timer event: timer.enabled = false ' do your code in selectionChangedEvent : timer.enabled = true timer.interval = 250 ---------------------------------------- I my case (MS foxpro) every time the selection Changes the timer is restarted, so nothing happens until the user stops the selection...
|
|
wlcabral
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |