Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent Grid RightClick in Grid while Update Method Runn
Message
 
 
À
10/05/2011 18:16:31
Scott Butts
Ims Specialty Services
Twin Falls, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01510235
Message ID:
01510238
Vues:
30
>>>I have a grid that is "built" by an update method called by a timer. This grid uses a custom textbox in all the columns so that I have several features one of them being a right click menu. I seem to be having an issue of a user right clicking in the grid WHILE the update method is running. I have tried several things, with no sucess. How would you prevent a native event from firing for the grid BEFORE any code in that event is run, so that the update method doesn't have a problem with updating the textbox of the grid control?
>>>
>>>Any suggestions?
>>
>>To prevent an event you need to use NODEFAULT. So, if you can identify condition, just add NODEFAULT for this condition in that method.
>
>Thanks Naomi,
>
>The problem is the fact that the rightclick event fires and the code is running means that the update method will fail becuase it can NOT remove the text field object of the grid. I hope that helps to explain the problem. What I need is to PREVENT any event\methods of the grid object from being able to "fire" or be called while the update code for the grid is running. I have tried setting the enabled property of the grid to false, but the rightclick method of the grid still fired and caused an issue.

One possibility is to cover grid with the transparent shape for the duration of the UPDATE. And when UPDATE is done place it back behind the grid with ZOrder
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform