Previous Topic

Next Topic

Label Components

A Label is a text component designed to allow text to be placed on a report.

See also Report Designer Component Properties for properties common to all components, such as position and size.

Label components have the following properties:

Alignment

Set options to align the component:

  • taLeftJustify - The text if left justified within the component.
  • taCenter - The text is centred within the component.
  • taRightJustify - The text is right justified within the component.

AlignWithMargins

When True, the component will align with the page margins.

Angle

The angle to display the text on. For example, setting the Angle to 90 will display the Caption vertically.

AutoHeight

When True, the height of the component will be automatically adjusted to fit the text.

AutoWidth

When True, the width of the component will be automatically adjusted to fit the text.

Border Properties

(BorderBottom, BorderLeft, BorderRight, BorderTop)

You can place borders around text components. This is useful for drawing boxes around components or separating components from each other with lines.

  • rbNone - No border is printed.
  • rbSingle - Print a single solid line border.
  • rbDouble - Print a double solid line border.
  • rbDashed - Print a single dashed line border.

BorderColor

The component border colour. Click Open Color Dialog (F2) to select the colour. See Color Property.

BrushColor

The component background colour. The Transparent property must be set to False for the BrushColor to be visible.

Click Open Color Dialog (F2) to select the colour. See Color Property.

ExportColumn

When exporting the report, the column that will contain this component text.

ExportColumnWidth

When exporting the report, the width of the column for this component.

ExportRow

When exporting the report, the Export Row is used if the Band is exporting multiple lines.

Font

Determines the font of the printed output. Click Open Font Dialog (F2) to select the font, style, size and characteristics. You can change the font by clicking the appropriate buttons on the toolbar. If you change the font, the ParentFont property (see below) will be set to false. The font properties - Name, Size, Colour, Bold, Underline, Italic and Strikeout can be accessed from MaxBasic code during a report. The font can be changed while a report is running to identify certain types of data.

FontColor

The text colour. Click Open Color Dialog (F2) to select the colour. See Color Property.

ParentCustomHint

When True, uses the Custom Hint of the parent Band.

ParentFont

When True, uses the Font of the parent Band. Setting this property to True means you can change the font of a band (or the entire report) and have all components on that band (or the report) change to the same font.

Text

The text to be displayed on the label. You can embed 'New Line' characters in Label components by pressing Ctrl+Enter.

VerticalAlignment

Set options to align the text within the component vertically:

  • avTop - The text is aligned with the top of the component.
  • avBottom - The text is aligned with bottom of the component.
  • avCenter - The texts is centered within the component.

AutoHeight must be False for this property to have an effect, so the component is a fixed height and text is aligned vertically within it.

WordWrap

 

When True, if the text in the component exceeds the width of the component, the text will wrap to new lines on word boundaries.

When False, if the text in the component exceeds the width of the component, the component width will be extended to fit the text.

See Also

Report Designer Components

Book Contents

Book Index