Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MousePointer in read-only grid
Message
 
 
À
03/02/1999 09:23:06
Magnus Persson
Widmark & Platzer Ab
Stockholm, Suède
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00183337
Message ID:
00183724
Vues:
28
Magnus,

>Thanks, I think it will be possible to capture the click event of the shape-object, and force a click event at the same coordinates for the underlying grid. At least I will give it a try.

This code converts clicks in a transparent shape positioned of the cells part of the grid.
LPARAMETERS nButton, nShift, nXCoord, nYCoord

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

local lnRow, lnCol, lnWidth
lnX = objtoclient( this, 2 ) + thisform.Left - 2
lnY = objtoclient( this, 1 ) + thisform.Top - 2
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 )
df (was a 10 time MVP)

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

Click here to load this message in the networking platform