Please enable JavaScript to view this site.

ESL Documentation

Object Inquiry Built-in Functions

Return the co-ordinates of an object.

{top|bottom|left|right} of OBJECT_NAME

OBJECT_NAME

The identifier for an object.

Description

Use these functions to find and use the current co-ordinate positions describing the smallest rectangular area occupied by an object, its contents, children, and children's contents.

The values returned are based upon the specified object's contents (drawing statements) and children's contents, and are expressed in the co-ordinates of the object, as shown in the tables that follow. If the object has no contents, ESL returns values of zero for these functions.

Avoid using these functions for a scaled graphical region that contains text, or in a program whose defined screen size is different from the display resolution. Since text does not scale, these functions can return incorrect values in these situations. The keyword of is not required when you use these functions in a drawing statement.

Graphical Region or Key

Function

Value Returned

top of

The topmost Y coordinate occupied by the contents of the object.

bottom of

The bottommost Y coordinate occupied by the contents of the object.

left of

The leftmost X coordinate occupied by the contents of the object.

right of

The rightmost X coordinate occupied by the contents of the object.

Image Region

Function

Value Returned

top of

The topmost Y coordinate occupied by the image file currently displayed in the region.

bottom of

Always 0.

left of

Always 0.

right of

The rightmost X coordinate occupied by the image file currently displayed in the region.

Textual Region

Function

Value Returned

top of

Always 1. This is the line number of the first line in the textual region.

bottom of

The line number of the last line of text in the textual region.

left of

Always 1. This is the column number of the first column in the textual region.

right of

The column number of the last column of the longest line in the textual region.

List Box

Function

Value Returned

top of

Always 1. This is the line number of the first line in the list box.

bottom of

The line number of the last line of text in the list box.

Spin Button

Function

Value Returned

bottom of

The total number of values in the numeric or alphanumeric spin button.

Entry Field

Function

Value Returned

left of

Always 1. This is the column number of the first character in the entry field.

right of

The column number of the last character in the entry field.

Table Object

Function

Value Returned

top of

Always 1.

bottom of

The number of rows in the table.

left of

Always 1.

right of

Number of columns in the table.

Example

 

response to Move_GR

 if ((right of Zoom_GR) < Max_IV) then

         add to Zoom_GR

         move to ((right of Zoom_GR) + 10) Height_IV

See Also

xmiddle of and ymiddle of Object Inquiry Built-in Functions