Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid MouseDown event not executing.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00213493
Message ID:
00213774
Vues:
30
William,

Just simply save the recno() to a property in BeforeRowColChange() and test recno() in AfterRowColChange() if it differs from the saved value they changed records. You can't use mouse events because they may have used the keyboard to change records.

>I am trying to detect when a user moves to a different record in a grid. I recorded the following events from the debugger which would work fine if the mousedown event of the grid executed.
>
>The grid object's name is element.
>
>wizard_master2.element.MouseMove(0, 0, 39, 219)
>wizard_master2.element.column8.MouseMove(0, 0, 39, 219)
>wizard_master2.element.MouseDown(1, 0, 39, 219)
>The above event is where I calculate if the position is a different record. If the user clicked on a different record I set lRecordChange to TRUE.
>
>wizard_master2.element.BeforeRowColChange(3)
>The above event I check to see if lRecordChange is TRUE and the current state of the grid is "ADD" I prompted the user with a "Save transaction?" If the user cancels I issue a NODEFAULT which places the cursor back in the last activate record.
>
>wizard_master2.element.column1.text1.RangeLow()
>wizard_master2.element.column1.text1.RangeHigh()
>wizard_master2.element.column1.text1.Valid()
>wizard_master2.element.column1.text1.LostFocus()
>wizard_master2.element.column8.btn.When()
>wizard_master2.element.column8.btn.GotFocus()
>wizard_master2.Paint()
>wizard_master2.element.AfterRowColChange(1)
>The above event is where I record the new current record position which is used to compare in the BeforeColChange event.
>
>wizard_master2.element.column8.btn.MouseDown(1, 0, 39, 219)
>wizard_master2.element.MouseUp(1, 0, 39, 219)
>wizard_master2.element.column8.btn.MouseUp(1, 0, 39, 219)
>
>The problem again is the debugger says the MouseDown event fired for the grid but the code in the event didn't execute.
>
>Any ideas?
>
>Thanks,
>Bill
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform