Top Property

Returns or sets the distance between the internal top edge of an object and the top edge of its container.

Syntax

Object.Top [ = fTop ]

The Top property syntax has the following parts:

 

Name

Type

Description

Object

Object

An object

fTop

Float

A number specifying the distance between the internal top edge of an object and the top edge of its container.

Comments

The following table describes how the Top property is used:

 

Object

Description

Controls

The Top property is measured in the scale units of the control's container. If the scale units are not defined, the default is pixels.

AForm

The Top property is measured in the scale units of the ScaleMode property and includes the borders and titlebar. If the scale units are not defined, the default is pixels.

AAxis

The Top property is measured in the scale units of the AChart object. If the scale units are not defined, the default is pixels.

AThumb

The Top property is measured in the scale units of the ASlider object. If the scale units are not defined, the default is pixels.

Use the Height, Width, Left, and Top properties for operations or calculations based on an object's total area, such as sizing or moving the object. Use the ScaleLeft, ScaleTop, ScaleHeight, and ScaleWidth properties for operations or calculations based on an object's internal area, such as drawing or moving objects within another object.

Example

The following statement changes the AButton's Top so the button is 4 units from the top edge of the form:

btn1.Top=4

Applies to

All controls that can be visible at run time and the following classes:

 

AAxis

AForm

AThumb

See Also

Height, Left, ScaleMode, ScaleTop, Width