Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Karl Hofer
  Where is Karl Hofer?
 Klagenfurt
 Austria
 Karl Hofer
 Tags
Subject: RE: RelativeRow - Is there an AbsoluteRow?
Thread ID: 228362 Message ID: 228369 # Views: 2 # Ratings: 1
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Monday, May 18, 2009 4:12:24 PM         
   


> >
> > Hi Karl,
> >
> > Maybe if you try to make use of the recno() can't you could attach your tooltip to that?
> >
> > Regards,
> >
> > Koen
>
> Yea, but i don't even know how to get the recno() of the entry under my mouse pointer as i am not clicking on it. Not clicking is the problem. But you are right, basically i am trying to find out the recno() of the entry under my mouse pointer.
>

Then perhaps grid.ActiveRow might help? It is > 0 as long as the currently highlighted row has not been scrolled out of the visible part of the grid:

CLEAR
PUBLIC oForm as Form
oForm = CREATEOBJECT('TestForm')
oForm.Show()
RETURN

DEFINE CLASS TestForm as Form
	AutoCenter = .T.
	AllowOutput = .F.
	PROCEDURE Load
		LOCAL i
		CREATE CURSOR temp (test Int)
		FOR i = 1 TO 10
			INSERT INTO temp VALUES (i)
		ENDFOR
		GO TOP IN temp
	ENDPROC

	ADD OBJECT Grid1 as Grid WITH AllowCellSelection = .F., RecordSource = 'temp'
	PROCEDURE Grid1.MouseMove(nButton, nShift, nXCoord, nYCoord)
		LOCAL lnWhere, lnRelRow, lnRelCol
		WITH This
			.GridHitTest(nXCoord,nYCoord,@lnWhere,@lnRelRow,@lnRelCol)
			IF !EMPTY(lnRelCol)
				IF !EMPTY(.ActiveRow)
					? lnRelRow
				ENDIF
			ENDIF
		ENDWITH
	ENDPROC
ENDDEFINE




hth
-Stefan

ENTIRE THREAD

RelativeRow - Is there an AbsoluteRow? Posted by Karl Hofer @ 5/18/2009 2:36:27 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Koen Piller @ 5/18/2009 3:01:07 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Karl Hofer @ 5/18/2009 4:04:27 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Stefan Wuebbe @ 5/18/2009 4:12:24 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Karl Hofer @ 5/18/2009 5:09:51 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Cetin Basoz @ 5/18/2009 4:57:06 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Karl Hofer @ 5/18/2009 5:20:36 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Cetin Basoz @ 5/18/2009 5:24:23 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Karl Hofer @ 5/18/2009 5:42:34 PM
RE: RelativeRow - Is there an AbsoluteRow? Posted by Joseph Agarpao @ 5/19/2009 10:18:47 AM