Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mouse Pointer problem
Message
 
 
To
03/04/1998 13:14:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00089348
Message ID:
00089450
Views:
23
Richard,

I cooked this up to implement a constant mouse pointer in a read-only grid. Add a shape object OVER the grid cell area, give it this MouseUp code:
<b>
* 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 )
</b>
It works well in a read only grid because it's not so important to get the text cursor where a field is clicked.

>Hi. I make up a form and has a grid on it. I want to change the mouse pointer when my mouse is over the grid control. I already set the property of the grid.mousepointer=1 (arrow) and the grid.column.textbox.mousepointer=1 but still there's no effect the mouse is still crosshair when my mouse is over the grid. I was wondering if there's a way to do it. Thanks.
df (was a 10 time MVP)

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

Click here to load this message in the networking platform