Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining Cell contents using MouseMove Event
Message
De
31/08/2001 09:24:14
 
 
À
31/08/2001 08:50:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00551286
Message ID:
00551347
Vues:
25
Ok Liam...

To follow on from Cetin's idea (Well, Nick's idea originally :)
chuck a shape over the grid & make it transparent
Then put the following code into the mousemove event
LPARAMETERS nButton, nShift, nXCoord, nYCoord

Dimension laFred[4]

Local lnLeft,lcClass

This.Visible = .f.
=aMouseObj(laFred)
This.Visible = .t.

lcClass = laFred[1].baseclass

If Lower(lcClass) = 'column'
	Wait Window Eval(laFred[1].controlsource) nowait
Endif
This will give you what you want without the grid getting focus...

BUT.. you will also need to implement click transparency to make the grid work normally


HTH
Will



>>Hi All,
>>
>>Has anyone got a solution (or a direction in which to go) for determining the contents of a cell in a grid over which a mouse is moving. I imagine the MouseMove event is where I need to begin but I'm kinda stuck at that point. Any assistance appreciated.
>>
>>TIA
>>
>>Liam
>
>Liam,
>If activating the cell under cursor is not a problem you could place a trasparent container (not shape) in front of grid and keep gridname in its tag :
>
>
*Container.MouseMove
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>store 0 to nWhere, nRelrow, nRelCol
>with eval(this.tag) && Tag keeps something like 'thisform.grdMyGrid'
> .GridHittest(nXCoord, nYCoord, @nWhere, @nRelRow, @nRelCol)
> .ActivateCell(nRelRow, nRelCol)
> wait window trans(eval(.Recordsource+'.'+varread())) nowait
>endwith
>
Cetin
Will Jones
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform