Hi all,
Lets say i have an overview screen with hundreds of records, which is being refreshed autmatically. Every 5 seconds the retrieve function is done.
Now on the rightclick event of the datawindow , our users can pop a menu with some additionnal functions.
What happens is , is when users are rightclicking and the menu pops open, the auto-retrieve function can kick in and change the focus from the current row the user clicked right on , to the first row of the datawindow. I can't change this.
In my menu i have functions taking the actual row selected and performing some actions on this record. It happens that the autoretrieve function sets the cursor to the first row , while the user is still looking at our menu to choose from.
In the clicked event of the menu , i can code to stop the autoretrieve function. No problem there, but of course i want the autoretrieve function to kick in again after the users has choosen from our menu , or hasn't choosen any menu at all.
I thought there would be a destroy/destructor/close event for menu's , but this doesn't exist.
How can i fix this iissue without having to start the start of the autoretrieve function after every menu item ?
Hope i made some sense here :)
TIA
John
please read my question again.
my question was exactly how or where to code this function. I can't be putting this function in every menu item.
any other suggestions please ?
John
I can't tell you how to code the function, because I don't know how you are making the DW retrieve every 5 seconds. The most common way is using the Timer Event and Function.
the problem is not where to write the code to STOP the autoupdate function.
the problem is where to write the code to START it again AFTER stopping it when a user has rightclicked to open our menu.
I don't want to code this at the end of every menu item clicked event.
I am looking for an event that's being triggered when the menu closes/destroys….
TIA
John