Share via


_OlkTextBox.AutoSize Property

Returns or sets a Boolean (bool in C#) that automatically sizes the control to display the entire contents. Read/write.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Property AutoSize As Boolean
    Get
    Set
'Usage
Dim instance As _OlkTextBox
Dim value As Boolean

value = instance.AutoSize

instance.AutoSize = value
[DispIdAttribute()]
bool AutoSize { get; set; }

Property Value

Type: System.Boolean

Remarks

The default value for this property is False.

For a single-line text box, setting AutoSize to True automatically sets the width of the display area to the length of the text in the text box.

For a multiline text box that contains no text, setting AutoSize to True automatically displays the text as a column. The width of the text column is set to accommodate the widest letter of that font size. The height of the text column is set to display the entire text of the text box. For a multiline text box that contains text, setting AutoSize to True automatically extends the text box vertically to display the entire text. The width of the text box does not change.

See Also

Reference

_OlkTextBox Interface

_OlkTextBox Members

Microsoft.Office.Interop.Outlook Namespace