Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event firing order problem in grid
Message
De
29/05/2003 13:33:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Event firing order problem in grid
Divers
Thread ID:
00794051
Message ID:
00794051
Vues:
48
In a navigation grid I am trying to keep the active row a few rows below the top. I also want a double click to change focus to page2 where editing occurs.

To accomplish it I initially did this:

1) In AfterRowColChange method I call a method that moves row to new position.
2) In DoubleClick() focus changes to page2.

Unfortunately, when person double clicked, AfterRowColChange fires before DoubleClick. As a result, when the second click occurs a different row is under the mouse, and the wrong record comes for edit.

To solve the problem, I was advised to place a delay in This.Click() for _DBLCLICK seconds while checking INKEY(.01,'M'). If a new click came in that time, This.Doubleclick is called. If the delay elapses normal behavior resumes including AfterRowColChange.

Now the problem is if user quickly clicks on two rows, meaning to navigate, the call from the INKEY loop fires DoubleClick and incorrectly send form to page2. I tried checking This.ActiveRow, but it doesn't seem to change while you are within the Click event!

Any suggestions?

Thank you very much.

Alex
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform