Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid activity for object under mouse
Message
 
 
To
04/04/2007 00:26:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01211777
Message ID:
01311067
Views:
36
Hi Jim,

Your test is temporarily activating the row the user is on which is not really good in terms of user interface.

There is really genious idea of using DynamicFontShadow property for this. I had the tooltip implemented using the code from Russian web site. I once sent Fred Taylor my version of it (basically at that point I only translated the comments). Later I tried to modify this a bit, but unfortunately I don't have the code anymore.

I may do some searches for this if required.

>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!
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform