Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid MouseDown event not executing.
Message
 
À
29/04/1999 11:31:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00213493
Message ID:
00213891
Vues:
28
Cetin,

The MDOWN in the BeforeRowColChange works. I just added some testing for LASTKEY() and I am in business.

Thanks,
Bill

>>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
>Try using mdown() instead.
	if mdown()
>		lnBottom	= .top+.headerheight+.relativerow * .rowheight
>		lnTop		= lnBottom - this.rowheight
>		lnMouseRowPos	= mrow(wontop(),3)
>		lnMouseColPos	= mcol(wontop(),3)
>		llChangingRow	= !(between(lnMouseRowPos,lnTop, lnBottom) ;
>		                  and between(lnMouseColPos,.left,.left+.width))
Cetin
Heavy Metal Pedal - click with care
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform