Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the Cursor Over Populated Grid?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00098457
Message ID:
00098541
Vues:
33
Jim,

Putting a shape over the grid gets rid of the pointer flicker that the MouseMove causes.

This chunk of code in the Shape.MouseUp will get the cell to activate:
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 )

>>How do you keep the cursor from becoming the I-bar that is normal over a populated grid? I changed both the grid's cursor property and the textbox's to be an arrow, but it still shows the I-bar unless the row doesn't have any data in it.
>Michael,
>
>You have to hit evry object that the mouse may move over. These are the Grid, each column, each column's header, and each column's control.
>
>In the grid's MouseMove put THIS.MousePointer = 1
>In the columns' MouseMove put THIS.Parent.MousePointer = 1
>In the Headers' MouseMove put THHIS.Parent.Parent.MousePointer = 1
>In the columns' controls MouseMove THIS.MousePointer = 1
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform