Spread Windows Forms 6.0 Product Documentation
AutoHeight Property
See Also  Example Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : AutoHeight Property


Glossary Item Box

Gets or sets whether the control resizes itself based on the font.

Syntax

Visual Basic (Declaration) 
Public Overridable Property AutoHeight As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SuperEditBase
Dim value As Boolean
 
instance.AutoHeight = value
 
value = instance.AutoHeight
C# 
public virtual bool AutoHeight {get; set;}

Property Value

Boolean value: true for the edit control to automatically set the height; false otherwise

Remarks

If you set the TextWrap property to true, you might want to set the AutoHeight property to false. The automatic height is based on the font height of one row of text. If the AutoHeight property is true and the text wraps, the height of the control does not change and only one line of text is displayed.

Example

C#Copy Code
control.Text = "Font";
Font fvalue = new Font("Comic Sans MS",14,System.Drawing.FontStyle.Bold);
control.Font = fvalue;
control.AutoHeight = true;
Visual BasicCopy Code
control.Text = "Font"
Dim fvalue As Font
fvalue = New Font("Comic Sans MS", 14, FontStyle.Bold)
control.Font = fvalue
control.AutoHeight = True

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.