Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid activity for object under mouse
Message
De
12/12/2008 13:40:24
 
 
À
12/12/2008 13:36:04
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01211777
Message ID:
01367011
Vues:
21
Jay --

it is the number of the column that you want to have temporarily activated ... normally one.

In my usage, I am trying to bring up a custom tooltip. The column selected should be one where there is no tooltip.

Hope this helps.


>I'm playing around with this code and you have this line in the code:
>
>* temporarily activate first cell, so that .RelativeRow makes sense
>			lnColno = .Columns(.c_ActivateCellColumn).ColumnOrder
>
>What is c_ActivateCellColumn?
>
>
>>John --
>>
>>I have the following for each column in my grid.
>>
>>I hope this works; I've thrown a lot of code that's clearly irrelevant and distracting -- hopefully that's all I threw away.
>>
>>Procedure MouseMove(x1,x2,x3,x4)
>>	Local nXCoord_In, nYCoord_In, lnColno, lnDiff, loGrid, nWhere_Out, nRelRow_Out, nRelCol_Out
>>	Local nView_Out
>>
>>	With This.Parent
>>
>>		* find out what row we're over
>>		nXCoord_In = Mcol(Wontop(),3)
>>		nYCoord_In = Mrow(Wontop(),3)
>>		Store 0 To nWhere_Out , nRelRow_Out , nRelCol_Out , nView_Out
>>		.GridHitTest(nXCoord_In, nYCoord_In, @nWhere_Out, @nRelRow_Out, @nRelCol_Out)
>>
>>		* over a cell, but not the same as last time
>>		If nWhere_Out = 3 And nRelRow_Out # This.h_DynToolTipRow
>>
>>			* temporarily activate first cell, so that .RelativeRow makes sense
>>			lnColno = This.Parent.Columns(This.Parent.c_ActivateCellColumn).ColumnOrder
>>			lnColno = lnColno + Iif(This.ColumnOrder = lnColno, 1, 0) - .LockColumns
>>			If .RelativeRow = 0 Or .RelativeColumn # lnColno
>>				.SetFocus()
>>				.ActivateCell(Max(1, .RelativeRow), lnColno)
>>			Endif
>>
>>			* move to the record we're interested in
>>			lnDiff = nRelRow_Out - .RelativeRow
>>
>>			Try
>>				Skip (lnDiff) In (.RecordSource)
>>			Catch
>>
>>			EndTry
>>			
>>			*******************************************************
>>
>>			*    temporarily on the right record ...
>>			*    so insert code to do something here ...
>>			
>>			*******************************************************
>>
>>			Skip (-lnDiff) In (.RecordSource)
>>			This.h_DynToolTipRow = nRelRow_Out
>>		Endif
>>	Endwith
>>Endproc
>>
>>
>>Procedure MouseLeave(nButton, nShift, nXCoord, nYCoord)
>>	This.h_DynToolTipRow	= 0
>>	Try
>>		Thisform.ShowTip()
>>	Endtry
>>Endproc
>>
>>
>>>Is there still no way in vfp to get a grid to be aware of the mouse pointer over it? I want to be able to run the mouse over cells in a column and details from the record to be displayed elsewhere on the form, without each cell having to get clicked on, or getting focus. Thanks!
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform