Label

Object List Hierarchy Next Object

Definition:

A control that allows you to place descriptive text on a form, frame, or picture, which cannot be modified directly by the user.

Icon: images/Phx00005.gif

Specialized Features:

The following tables list and describe the properties and events added by Label. There are no added methods.


Properties Use to...


Alignment Determine the alignment of text in a control.

BorderStyle Determine the type of border to be used.

Ctrl3d Enable the 3-D effects for the control.

LineHeight Determine the height of a single string (Read only)

LinesVisible Determine how many full lines are visible given the fonts size and the Labels height (Read only)

Text Create a non-persistant Caption.

WordWrap Determine whether a label can change its vertical or horizontal size to accommodate the label text.


Events Use to...


Change Indicate that the contents of a control have changed and initiates some action.

Click Perform an action when the user presses and releases a mouse button while on an object, or when the value of a control is changed in code.

DblClick Perform an action when the user presses and releases a mouse button twice in rapid succession over an object.

GotFocus Define what occurs when an object is given the focus.

KeyDown Define what occurs when the user presses a key while an object has the focus.

KeyPress Define what occurs when the user presses and releases an ANSI key.

KeyUp Define what occurs when the user releases a key while an object has the focus.

LostFocus Define what occurs when an object loses the focus.

Copied Features:

images/Phx00169.gif Properties images/Phx00170.gif Methods images/Phx00171.gif Events

Details:

Labels are typically used to provide text that describes the purpose of a particular control, such as text boxes and list boxes.

You can write code that creates a multiple-line label or changes a label in response to events while the application is running. For example, if your application takes a few minutes to complete a particular type of process, a message indicating the processing status can be included in the label.

Set the WordWrap property to accommodate variable-length lines or varying numbers of lines.

See Also:

DataControl, TextBox