Please enable JavaScript to view this site.

ESL Documentation

Object Inquiry Built-in Functions

Return the coordinates of the cursor's position in a graphical object, textual region, or table object.

{xcursor|ycursor} of OBJECT_NAME

OBJECT_NAME

The identifier for an object.

Description

Use these functions to find and use the coordinates of the current position of the graphics cursor in a specified graphical object, or of the position of the text cursor in a specified textual region, or within a table. If you specify these functions within a response to any other type of object, zero will be returned.

The keyword of is not required when you use these functions in a drawing statement.

The values are expressed in the object's own coordinates.

Graphical Objects

Function

Value Returned

xcursor of

The X coordinate of the graphics cursor position.

ycursor of

The Y coordinate of the graphics cursor position.

Textual Regions

Function

Value Returned

xcursor of

The column number of the text cursor position.

ycursor of

The line number of the text cursor position.

Table Objects

Function

Value Returned

xcursor of

The column number where the input cursor is.

ycursor of

The row number where the input cursor is.

Example

 

response to MoveMenu_PB

 copy (xcursor of DrawReg_GR) to SaveX

 copy (ycursor of DrawReg_GR) to SaveY

 add to DrawReg_GR

         pattern Box_Pat

 move to SaveX_IV SaveY_IV # Restore original graphics

         ... # cursor position