Object Reference > True DBGrid Methods > PointAt Method |
PointAt Method
The PointAt method returns one of the constants in the preceding list, which indicates the kind of grid element beneath the specified coordinate pair.
TDBGrid.PointAt (x, y)
Arguments
x and y are singles that define a coordinate pair in twips.
Return Value
Remarks
Run Time
0 - Not in Grid |
dbgNotInGrid |
1 - At Grid Caption |
dbgAtCaption |
2 - At Split Header |
dbgAtSplitHeader |
3 - At Split Size Box |
dbgAtSplitSizeBox |
4 - At Row Select |
dbgAtRowSelect |
5 - At Row Size |
dbgAtRowSize |
6 - At Column Header |
dbgAtColumnHeader |
7 - At Column Footer |
dbgAtColumnFooter |
8 - At Column Size |
dbgAtColumnSize |
9 - At Data Area |
dbgAtDataArea |
10 - At Group Area |
dbgAtGroupArea |
11 - At Group Header |
dbgAtGroupHeader |
This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a grid element.
Note
You must convert the x and y arguments to twips, even if the container's ScaleMode (Visual Basic) setting specifies a different unit of measurement.