Partager via


RichTextBox Class

Definition

Represents a Windows Forms RichTextBox that can be added to a Microsoft Office Excel worksheet.

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

Remarks

The Microsoft.Office.Tools.Excel.Controls.RichTextBox is different from a System.Windows.Forms.RichTextBox. The Microsoft.Office.Tools.Excel.Controls.RichTextBox has additional members that enable it to be added to an Excel worksheet and that give it additional methods and properties.

Do not use the New constructor to create a new RichTextBox. Use the AddRichTextBox method to add a new RichTextBox to a worksheet.

Properties

AltHTML
Application

Gets an Application object that represents the creator of the RichTextBox.

Border

Gets a Border that represents the border of the RichTextBox.

Bottom

Gets the distance, in points, between the bottom edge of the RichTextBox and the top edge of the worksheet.

BottomRightCell

Gets a Range object that represents the cell that lies under the lower-right corner of the RichTextBox.

Creator

Gets a value that indicates the application in which the RichTextBox was created.

Height

Gets or sets the height of the RichTextBox.

Index

Gets the index number of the RichTextBox within the collection of OLEObjects on the sheet.

Interior

Gets an Interior object that represents the interior of the RichTextBox.

Left

Gets or sets the distance, in points, between the left edge of the RichTextBox and the left edge of the worksheet.

Locked

Gets or sets a value that indicates whether the RichTextBox can be modified at design time when the sheet is protected.

OLEType

Gets a value that represents the OLE object type.

OnAction
Parent

Gets the parent object for the RichTextBox.

Placement

Gets or sets an object that indicates the way the RichTextBox is attached to the cells below it.

PrintObject

Gets or sets a value that indicates whether the RichTextBox is printed when the worksheet is printed.

Right

Gets the distance, in points, between the right edge of the RichTextBox and the left edge of the worksheet.

ShapeRange

Gets a ShapeRange object that represents the RichTextBox.

SourceName

Gets or sets the link source name of the RichTextBox.

Top

Gets or sets the distance, in points, between the top edge of the RichTextBox and the top edge of the worksheet.

TopLeftCell

Gets a Range object that represents the cell that lies under the upper-left corner of the RichTextBox.

Visible

Gets or sets a value that represents whether the RichTextBox is visible.

Width

Gets or sets the width of the RichTextBox in points.

ZOrder

Gets the z-order position of the RichTextBox.

Methods

Activate()

Activates the RichTextBox.

BringToFront()

Brings the RichTextBox to the front of the z-order.

CopyPicture(XlPictureAppearance, XlCopyPictureFormat)

Copies the RichTextBox to the Clipboard as a picture.

Delete()

Deletes a dynamically created RichTextBox from the worksheet and removes it from the ControlCollection.

Select(Object)

Selects the RichTextBox.

SendToBack()

Sends the RichTextBox to the back of the z-order.

SetVisibleCore(Boolean)

Sets the RichTextBox to the specified visible state.

Update()

Applies to