LPARAMETERS nButton, nShift, nXCoord, nYCoord * converts a mouse click in the shape to activate the underlying grid cell local lnRow, lnCol, lnWidth, loGrid lnWidth = 0 nXCoord = nXCoord - this.Left loGrid = evaluate( "this.parent." + this.mcGridName ) lnRow = int( 1 + ( this.Top - ( loGrid.Top + loGrid.HeaderHeight ) ) / loGrid.RowHeight ) for lnCol = loGrid.LeftColumn to loGrid.ColumnCount lnWidth = lnWidth + loGrid.Columns[lnCol].Width + loGrid.GridLineWidth if ( lnWidth > nXCoord ) exit endif endfor lnCol = lnCol - loGrid.LeftColumn + 1 loGrid.SetFocus() loGrid.ActivateCell( lnRow, lnCol )