Topic: APLX Help : System Classes : Methods : Pointtocell
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

The 'Pointtocell' method


Argument: 2-element Numeric Vector
Result: 2-element Numeric Vector

Valid for: Grid

This method converts from coordinates of the grid control on the screen to a cell position. It is particularly useful for respondng to mouse-down events on the grid, if you need to know which cell the user has clicked in.

The argument is a two-element vector of the vertical and horizontal position within the visible control (remembering that top, left is 0, 0). It is expressed in the current scale of the control; you will probably want to set the scale property to 5 for pixels before calling this method.

The result is an integer pair of Cell Row, Cell Column. For each element of pair, it returns -N if the point is in a header row or column, 0 if not in any row or column, +N if in normal row or column


Topic: APLX Help : System Classes : Methods : Pointtocell
[ Previous | Next | Contents | Index | APL Home ]