|
Home > Archive > FoxPro Help and Support > June 2005 > can i find the record number over which my mouse is positioned
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
can i find the record number over which my mouse is positioned
|
|
|
| Is it possible to get the record number over which my mouse pointer is
located?
Using VFP8.0
| |
| BlackSabbath 2005-06-14, 7:24 am |
| Le Tue, 14 Jun 2005 16:39:19 +1000, Pk <pk@vfp.ui> a écrit:
> Is it possible to get the record number over which my mouse pointer is
> located?
> Using VFP8.0
>
>
What is the interest of the record number ???
It would be better interesting to speak about a specific id field !
Do U have one ?
assuming the name of this field = ID
In a timer interval event
oUnderMouse = SYS(1270)
IF TYPE("oUnderMouse") = "O" ;
AND TYPE("oUnderMouse.parent") = "O" ;
AND oSousMouse.parent.parent.class = "Grid")
AND oSousMouse.class = "textBox"
oGrid = oSousMouse.parent.parent
cTable = oGrid.RecordSource && MyTable
FOR n = 1 TO oGrid.ColumnCount
IF oGrid.Column(n).ControlSource = cTable + ".ID"
DO something
ENDIF
NEXT
ENDIF
| |
|
| Ok I do have an ID field.
But still conder the following,
- 3 records,
- each record has ID values of , A, B and B
- Currently record pointer is on record where ID = A
- When i place my mouse pointer over the 3 record where ID = C
i want to do something,
but how do i know that the mouse pointer is over the record where ID = C.
"BlackSabbath" <no.spam@in.hell> wrote in message
news:opsscz4tv9973os
b@pc6-ne5.tnn.ap-hop-paris.fr...
> Le Tue, 14 Jun 2005 16:39:19 +1000, Pk <pk@vfp.ui> a écrit:
>
> What is the interest of the record number ???
> It would be better interesting to speak about a specific id field !
> Do U have one ?
> assuming the name of this field = ID
>
> In a timer interval event
> oUnderMouse = SYS(1270)
>
> IF TYPE("oUnderMouse") = "O" ;
> AND TYPE("oUnderMouse.parent") = "O" ;
> AND oSousMouse.parent.parent.class = "Grid")
> AND oSousMouse.class = "textBox"
> oGrid = oSousMouse.parent.parent
> cTable = oGrid.RecordSource && MyTable
> FOR n = 1 TO oGrid.ColumnCount
> IF oGrid.Column(n).ControlSource = cTable + ".ID"
> DO something
> ENDIF
> NEXT
> ENDIF
| |
| Carsten Bonde 2005-06-15, 3:25 am |
| Pk,
if you are showing the data in a grid, you might take a look at the
AMouseObj()-function.
--
Cheers
Carsten
____________________
___________
"Pk" <pk@vfp.ui> schrieb im Newsbeitrag
news:#W$rteTcFHA.3712@TK2MSFTNGP09.phx.gbl...
> Ok I do have an ID field.
> But still conder the following,
> - 3 records,
> - each record has ID values of , A, B and B
> - Currently record pointer is on record where ID = A
> - When i place my mouse pointer over the 3 record where ID = C
> i want to do something,
> but how do i know that the mouse pointer is over the record where ID = C.
>
> "BlackSabbath" <no.spam@in.hell> wrote in message
> news:opsscz4tv9973os
b@pc6-ne5.tnn.ap-hop-paris.fr...
>
>
| |
| Eugene Vital 2005-06-22, 8:25 pm |
| Pk wrote:
> Is it possible to get the record number over which my mouse pointer is
> located?
> Using VFP8.0
>
>
check out GridHitTest in the help file
|
|
|
|
|