Character Comb

This topic explains the basics of using the XRCharacterComb control and describes its main features.

Overview

The XRCharacterComb control displays text so that each character is printed in an individual cell.

cellular-label-report-control

To add a Character Comb to the report, drag the XRCharacterComb item from the DX:18.1: Report Controls Toolbox tab and drop it onto the report.

drop-control-cellular-label-toolbox

The number of cells displayed by the control in Print Preview depends on the CanShrink and AutoWidth settings.

  • If both these properties are enabled, the number of cells corresponds to the number of characters in the control's text.
  • Otherwise, the number of cells corresponds to the specified cell size and the control size.

See the Content Layout and Position section to learn more on using these properties.

You can also adjust the character comb's size to match its characters at design time by right-clicking the control and using the Fit Bounds To Text command in the context menu:

  • If the XRControl.WordWrap option is enabled, the command keeps control content displayed in multiple lines. It decreases the control's height and adjusts the width to fit this content.

    vs-rd-character-comb-fit-bounds-to-text

  • If the XRControl.WordWrap option is disabled, the command adjusts the control's height and width to completely display the control's content in a single line. As a result, the number of cells corresponds to the number of characters.

    vs-rd-character-comb-fit-bounds-to-text-wordwrap-disabled

When exporting this control to third-party formats, consider the following.

  • When exporting to an XLS or XLSX file, the XRCharacterComb cells correspond to the cells of a resulting Excel sheet.
  • When exporting to a CSV (or TXT) file, the content of individual cells is separated (or spaced) by a specified TextExportOptionsBase.Separator character.

In most aspects, the Character Comb is similar to the XRLabel control from which it inherits most of its properties and its basic behavior. For general information about binding these controls to data and display summary function results, see the Label topic. To learn about Character Comb specifics, see the following sections in this document.

Main Options

The following properties are specific to the XRCharacterComb control.

Content Layout and Position

This section describes the XRCharacterComb properties that affect the control's position on a page and content layout.

The following image illustrates the behavior of the XRLabel.AutoWidth property that specifies whether or not the width of a control depends on its text.

AutoWidth = true AutoWidth = false
cellular-label-auto-width-true cellular-label-auto-width-false

The following image illustrates the behavior of the XRLabel.CanShrink property that specifies whether or not the height of a control depends on its text.

CanShrink = true CanShrink = false
cellular-label-can-shrink cellular-label-auto-width-false

The XRCharacterComb.TextAlignment property specifies the alignment of text within a control.

TextAlignment = TopLeft TextAlignment = MiddleCenter TextAlignment = BottomRight
cellular-label-alignment-left cellular-label-alignment-center cellular-label-alignment-right

See Also