Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore question
Message
 
 
À
15/10/1998 17:31:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00146041
Message ID:
00147284
Vues:
50
Larry,

If you set the Text1.ForeColor and .BackColor with the column.Sparse set to .t. you should be able to come up with the same colors that the highlighting shape is providing for the non-current cells.

Is the grid really a readonly grid? If so overlay your own transparent shape over the cell region of the grid. It'll keep the cursor from changing to an I beam. You can use this code to convert clicks into cells:
Shape.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 )
>Ok, I've tried returning .f. from the textbox "when" method. It still changes colors, there's just no cursor showing.
>
>Would your solution involve the overlying shape approach? That would be great if it will solve my problem, um... challenge :)
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