Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore question
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00146041
Message ID:
00147284
Views:
44
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
Previous
Reply
Map
View

Click here to load this message in the networking platform