CurrentX Property (AForm)

Returns or sets the horizontal coordinate for the next drawing method.

 Syntax

Object.CurrentX [ = fNumber ]

The CurrentX property syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

fNumber

Float

An integer specifying the horizontal coordinate for the next drawing method.

Comments

This property is not available at design time and is read-only at run time. The property is not applicable for MDI Form type since drawing functions are not supported for MDI Forms.

Coordinates are measured from the upper-left corner of an object. The CurrentX property setting is 0 at an object's left edge, and the CurrentY property setting is 0 at its top edge. Coordinates are expressed in pixels, or the current unit of measurement defined by the ScaleHeight, ScaleWidth, ScaleLeft, ScaleTop, and ScaleMode properties.

When using the following graphics methods, the CurrentX and CurrentY settings are changed as indicated:

 

Graphics method

Sets currentsX and Current Y to

Circle

The center of the object

Cls

 0, 0

Line

The end point of the line

DrawText

The line below the text drawn

PSet

The point drawn

Example

The following statements draw a horizontal red dash line (every 20 pixels draw a line of 10 pixels) starting from 10, 20:

CurrentX=10

CurrentY=20

DrawWidth=2

for i=0 to 10

Line(, , 10, 0, aclrRed)

CurrentX=CurrentX+10

next

Applies to

AForm

See Also

CurrentY, ScaleLeft, ScaleTop, ScaleHeight, ScaleMode, ScaleWidth