[]
Returns the cell position for a set of coordinates.
public bool CellContaining(int x, int y, out int rowAt, out int colAt)
Type | Name | Description |
---|---|---|
int | x | Integer that defines the x coordinate in pixels. |
int | y | Integer that defines the y coordinate in pixels. |
int | rowAt | Integer that receives the zero-based index of the row beneath the specified y coordinate. |
int | colAt | Integer that receives the zero-based index of the column beneath the specified y coordinate. |
Type | Description |
---|---|
bool | A boolean that indicates whether a data cell is beneath the specified coordinate pair. |
The CellContaining method combines the ColContaining(int) and RowContaining(int) methods into one call. If the coordinate pair specified by x and y points to a data cell, this method returns True, and the rowindex and colindex arguments receive zero-based indexes that identify the cell.