Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Enabled = .F.
Message
 
 
À
23/10/1998 21:55:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00149201
Message ID:
00150085
Vues:
23
John,

Overlay a transparent shape on the cell portion of the grid. Set it's mouse pointer and use this MouseUp method:
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 )
>Thanks for the input. I gave it a try and it works, but the look is like you can edit it as you can move the cursor into the grid. I found that the Grid.SetAll worked out better for me in this situation.
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