다음을 통해 공유


TextBox Class

Definition

Represents a Windows Forms TextBox that can be added to a Microsoft Office Word document.

public ref class TextBox : System::Windows::Forms::TextBox
[System.ComponentModel.DefaultEvent("TextChanged")]
[System.ComponentModel.DefaultProperty("Text")]
[System.ComponentModel.ToolboxItem(false)]
public class TextBox : System.Windows.Forms.TextBox
[<System.ComponentModel.DefaultEvent("TextChanged")>]
[<System.ComponentModel.DefaultProperty("Text")>]
[<System.ComponentModel.ToolboxItem(false)>]
type TextBox = class
    inherit TextBox
Public Class TextBox
Inherits TextBox
Inheritance
TextBox
Attributes

Remarks

The Microsoft.Office.Tools.Word.Controls.TextBox is different from a System.Windows.Forms.TextBox. The Microsoft.Office.Tools.Word.Controls.TextBox has additional members that enable it to be added to a Word document and that give it additional methods and properties.

Do not use the constructor to create a new TextBox. Use the AddTextBox method to add a new TextBox to a document.

Properties

AltHTML
Automation
Bottom

Gets the distance, in points, between the bottom edge of the TextBox and the top edge of the document.

Height

Gets or sets the height of the TextBox.

InlineShape

Gets the underlying InlineShape of the TextBox.

Left

Gets or sets the distance, in points, between the left edge of the TextBox and the left edge of the document.

Right

Gets the distance, in points, between the right edge of the TextBox and the left edge of the document.

Shape

Gets the underlying Shape of the TextBox.

Top

Gets or sets the distance, in points, between the top edge of the TextBox and the top edge of the document.

Width

Gets or sets the width of the TextBox in points.

Methods

Activate()

Activates the TextBox.

Delete()

Deletes a dynamically created TextBox from the document and removes it from the ControlCollection.

Select()

Selects the TextBox.

SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
SetVisibleCore(Boolean)

Applies to