You are on page 1of 2

Lesson 2

Using Labels
Label Properties

OBJECTIVES:
1. Familiarize with the label properties.
2. Create and use label control.
LABELS
hold text that appears on the Form. Labels cannot be edited directly an
explicit code assigning a new caption to the Label should be carried out.
LABEL CONTROL PROPERTIES
Property
Alignment

Description
Determines whether the text appears 0: left-justified, 1: rightjustified, or 2: centered within the Labels boundaries.

AutoSize

Boolean. Enlarges the Labels size properties, when True, if you


assign a caption that is too large to fit in the current Labels
boundaries at runtime. If False, the Label truncates the
caption.

BackStyle

Determines whether the background shows through the label


of if the Label covers up it background text, graphics, and
color.

BorderStyle

0: None, 1: Fixed Single. Determines whether a single-line


border appears around the Label.

Caption

Holds the text that appears on the Label.

Enabled

Boolean. Determines whether the Label is active. A disabled


Label does not trigger an even procedure.

Font

Specifies the font of the text. Clicking this property will invoke
a font dialog box in which you can set the font name, style, and
size.

ForeColor

Specifies the color of the text. Programmer selects a color


from the Color Palette or specifies a color in Hex format.

1|Page

Height

Specifies the height of the Label in twips.

Left

Specifies the number of twips from the Labels left edge to the
Form windows left edge.

MousePointer Determines the image of the mouse cursor when the user
moves the mouse pointer over the Label.
TabIndex

Specifies the order of the Label in the focus order.

TabStop

Boolean. Determines whether the Label can receive the focus.

ToolTipText

Holds the text that appears as a tooltip at runtime. A tooltip is


a pop-up description box that appears when the user rests the
mouse pointer over a control.

Top

Specifies the number of twips from the Labels top edge to the
Form windows top edge.

Visible

Boolean. Determines whether the Label appears (True) or is


hidden from the user (False) at runtime. Invisible Labels are only
invisible at runtime.

Width

Holds the width of the Label in twips.

WordWrap

Determines whether the Label expands to fit its caption.

2|Page

You might also like