Please enable JavaScript to view this site.

ESL Documentation

The position defines the origin of the object in its parent. You specify the position of a graphical object by specifying the at position attribute in the object's definition, or by specifying at default position.

 

When you specify the at position attribute, you define the object's origin in the X and Y coordinates in the coordinate system of the object's parent. If the object has no parent, the default parent is the primary region, for example:

 

key Start at position 50 100

 

You can also add ancestry to the position, placing the object in the coordinate system of another object; for example:

 

key Start at position 50 100 in OpenFinance

 

Here, the coordinate positions of the child Start are relative to the starting position of its parent, OpenFinance.

 

You can specify an integer value to represent the coordinate positions; for example:

 

key Start at position XStart (Height*2)

 

When you specify the at default position attribute, you define the object's origin as being at the current position of the graphics cursor of the object's parent. If the object has no parent, the default position is 0 0 (X=0, Y=0) in the primary region.

 

The at default position specification is useful when you add or modify an object in a response definition, using the add or change to statements. Using this specification, you need not compute the exact position of the graphics cursor in the parent object. For example, if you add an object as the child of a graphical region, you can specify the child's position as at default position, as shown in the following example:

 

graphical region Box1 size 50 50 at position 0 0

    draw 10 10

 

response to start

    add key Box2 at default position in Box1

        box 20 20

 

In this example, Box2 is at position 10 10 in Box1, because that is where the last drawing statement in Box1 left its graphics cursor.