A line on a form.

Syntax

[<oRef> =] new Line(<container> [,<name expC>])

<oRef>

A variable or property—typically of <container>—in which to store a reference to the newly created Line object.

<container>

The container—typically a Form object—to which you’re binding the Line object.

<name expC>

An optional name for the Line object. If not specified, the Line class will auto-generate a name for the object.

Properties

The following tables list the properties of interest of the Line class. (No particular events or methods are associated with this class.)

Property

Default

Description

baseClassName

LINE

Identifies the object as an instance of the Line class

bottom

 

The location of the bottom end of the Line in the form’s current metric units, relative to the top edge of its container

className

(LINE)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

colorNormal

WindowText

Color of the line

fixed

false

Whether the Line object’s position is fixed or if it can be "pushed down" or "pulled up" by the rendering or suppression of other objects

left

 

The location of the left end of the Line in the form’s current metric units, relative to the left edge of its container

pen

Solid

The pen style used to draw the line (0=Solid, 1=Dash, 2=Dot, 3=DashDot, 4=DashDotDot)

right

 

The location of the right end of the Line in the form’s current metric units, relative to the left edge of its container

top

 

The location of the top of the Line in the form’s current metric units, relative to the top edge of its container

width

1

Width in pixels

The following table lists the common properties, events, and methods of the Line class:

Property

 

Event

Method

before
form

id

name

pageno
parent

printable

visible

beforeRelease
canRender

onClose
onDesignOpen
onOpen
onRender

release( )

Description

Use a Line object to draw a line in a form or report. Note that the position properties—top, left, bottom, and right—work different for the Line object than they do with other components. The width property controls the thickness of the line.

A Line has no hWnd because it is drawn on the surface of the form; it is not a genuine Windows control. Despite its position in the form’s z-order, a Line can never be drawn on top of another component (other than a Line or Shape).