The AutoSize class is used with the TextControl.AutoControlSize property, to enable automatic expansion or shrinking of a Text Control's width or height. Additionally, it contains properties for setting maximum and minimum values. Automatic expansion or shrinking is only possible, if the TextControl.ViewMode property has been set to SimpleControl.

Syntax

public class AutoSize
Public Class AutoSize

Introduced: 11.0.

Examples

The following example shows how to set up a TextControl that expands and shrinks horizontally with a maximum size of 600 pixels.

textControl1.ViewMode = TXTextControl.ViewMode.SimpleControl;
textControl1.AutoControlSize.AutoExpand = TXTextControl.AutoSizeDirection.Horizontal;
textControl1.AutoControlSize.AutoShrink = TXTextControl.AutoSizeDirection.Horizontal;
textControl1.AutoControlSize.MaxSize = new System.Drawing.Size(600, 600);
TextControl1.ViewMode = TXTextControl.ViewMode.SimpleControl
TextControl1.AutoControlSize.AutoExpand = TXTextControl.AutoSizeDirection.Horizontal
TextControl1.AutoControlSize.AutoShrink = TXTextControl.AutoSizeDirection.Horizontal
TextControl1.AutoControlSize.MaxSize = New System.Drawing.Size(600, 600)

Constructors

Constructor Description
AutoSize Initializes a new instance of the AutoSize class.

Properties

Property Description
AutoExpand Gets or sets possible directions for expanding the control.
AutoShrink Gets or sets possible directions for shrinking the control.
MaxSize Gets or sets the maximum size, in pixels, for expanding the control.
MinSize Gets or sets the minimum size, in pixels, for shrinking the control.