Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MousePointer in read-only grid
Message
From
04/02/1999 06:53:15
Magnus Persson
Widmark & Platzer Ab
Stockholm, Sweden
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00183337
Message ID:
00183807
Views:
22
Thanks, this solved the problem in a way that did not include any methodwriting in subobjects of the grid. Works great.
Magnus

>Magnus,
>
>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 )
>
Previous
Reply
Map
View

Click here to load this message in the networking platform