TX Text Control .NET for Windows Forms Documentation

AutoSize Class

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.

Introduced: 11.0.

Syntax

[C#] public class AutoSize
[Visual Basic] Public Class AutoSize

Constructors

ConstructorDescription
AutoSizeInitializes a new instance of the AutoSize class.

Properties

PropertyDescription
AutoExpandGets or sets possible directions for expanding the control.
AutoShrinkGets or sets possible directions for shrinking the control.
MaxSizeGets or sets the maximum size, in pixels, for expanding the control.
MinSizeGets or sets the minimum size, in pixels, for shrinking the control.

Example

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

[C#] textControl1.ViewMode = TXTextControl.ViewMode.SimpleControl; textControl1.AutoControlSize.AutoExpand = TXTextControl.AutoSizeDirection.Horizontal; textControl1.AutoControlSize.AutoShrink = TXTextControl.AutoSizeDirection.Horizontal; textControl1.AutoControlSize.MaxSize = new Size(600, 600);
[Visual Basic] TextControl1.ViewMode = TXTextControl.ViewMode.SimpleControl TextControl1.AutoControlSize.AutoExpand = TXTextControl.AutoSizeDirection.Horizontal TextControl1.AutoControlSize.AutoShrink = TXTextControl.AutoSizeDirection.Horizontal TextControl1.AutoControlSize.MaxSize = New Size(600, 600)

See Also

 
 
 

Products

Support

Downloads

Corporate

Buy Now