View Categories

Automatic resizing of text components

< 1 min read

Auto-sizing for text components works differently than for other components.Can GrowWhenCan ShrinkThe property only affects the height of the text component, not its width. The example below changes the height of the textCan GrowIt shows an example property.

The CanShrink property does the opposite. This means that if the CanShrink property is set to true and the text has more space than required, the report generator will automatically reduce the height of the text component.

Both properties can be set to true like any other component. In this case, the height will automatically increase or decrease depending on the size of the text.

WordWrap property

The WordWrap property controls whether text in the control automatically wraps when it is too long to fit on one line. If the WordWrap property is set to false, the text will be clipped at the component's borders, but if set to true, new lines will be created until all the text is displayed on multiple lines.

When automatically resizing a text component that has the WordWrap property set to false, the report generator will calculate the new size based on the height of one line only. If you want the report generator to increase the height of the component based on all lines of text, set the value of the WordWrap property to true so that the text is automatically wrapped and the total height of all lines of text is so that it can be calculated based on

AutoWidth property

In addition to the CanGrow and CanShrink properties, the AutoWidth property also affects how text components resize. If the AutoWidth property is set to true, the text component will automatically resize its width to fit the width of the text. CanGrow property, CanShrink property and AutoWidth property can be used at the same time.

If the AutoWidth property is set to false, the text height depends on the CanGrow and CanShrink property settings. If the AutoWidth property is set to true, the width will change automatically.

 caution: If the AutoWidth property is set to false, the text height depends on the CanGrow and CanShrink properties. If the AutoWidth property is set to False, the width of the text will change.