Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mouse pointer in grid
Message
 
 
To
06/04/1998 17:47:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00089992
Message ID:
00090006
Views:
31
Marc,

Depending on exactly what you are trying to accomplish, it depends. This works well for a readonly grid where the user isn't doing anything but navigating the grid.

Add a transparent shape over the grid that is the same size as the cells portion of the grid. Give it this MouseUp:

LPARAMETERS nButton, nShift, nXCoord, nYCoord

* converts a mouse click in the shape to activate the underlying grid cell

local lnRow, lnCol, lnWidth

lnRow = int( 1 + ( nYcoord - this.Top ) / thisform.grdTheGrid.RowHeight )

lnWidth = 0
nXCoord = nXCoord - this.Left

for lnCol = thisform.grdTheGrid.LeftColumn to thisform.grdTheGrid.ColumnCount
   lnWidth = lnWidth + thisform.grdTheGrid.Columns[lnCol].Width + thisform.grdTheGrid.GridLineWidth
   if ( lnWidth > nXCoord )
      exit
   endif
endfor

lnCol = lnCol - thisform.grdTheGrid.LeftColumn + 1

thisform.grdTheGrid.ActivateCell( lnRow, lnCol )


You need to change the name of the grid as needed.

>
>Any tips on how to change the mouse pointer in a grid from the standard 'I' beam to f.i. an arrow ?
>
>Tried aleady several things, but "@#|[]~~yujjhg" they did'n work. :)
>
>
>Marc
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform