Skip to main content
A newer version of this page is available. .

XRLabel.TextFitMode Property

Specifies how the text is resized to fit the control. This property is not available if the Can Grow, Can Shrink, or Auto Width option is enabled.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v23.1.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

[DefaultValue(TextFitMode.None)]
[SRCategory(ReportStringId.CatBehavior)]
public virtual TextFitMode TextFitMode { get; set; }

Property Value

Type Default Description
TextFitMode None

A TextFitMode enumeration value.

Remarks

You can use the TextFitMode property to adjust the text font size to fit the control area. The text is specified using the XRControl.Text property.

xrlabel-text-fit-mode-properties-window

The table below demonstrates the available modes and their result for labels with different content.

Value

Description

None

The text size remains unchanged.

label-text-fit-mode-none

GrowOnly

The text size is automatically increased to occupy the entire area of the control.

label-text-fit-mode-grow-only

ShrinkOnly

The text size is automatically reduced to display the entire text in the control.

label-text-fit-mode-shrink-only

ShrinkAndGrow

The text size can be automatically decreased or increased to fit the control boundaries.

label-text-fit-mode-shrink-and-grow

The TextFitMode property is not in effect in the following situations:

See Also