Label Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a Windows Forms Label that can be added to a Microsoft Office Excel worksheet.
public ref class Label : System::Windows::Forms::Label
[System.ComponentModel.DefaultEvent("Click")]
[System.ComponentModel.DefaultProperty("Text")]
[System.ComponentModel.ToolboxItem(false)]
public class Label : System.Windows.Forms.Label
[<System.ComponentModel.DefaultEvent("Click")>]
[<System.ComponentModel.DefaultProperty("Text")>]
[<System.ComponentModel.ToolboxItem(false)>]
type Label = class
inherit Label
Public Class Label
Inherits Label
- Inheritance
-
Label
- Attributes
Remarks
The Microsoft.Office.Tools.Excel.Controls.Label is different from a System.Windows.Forms.Label. The Microsoft.Office.Tools.Excel.Controls.Label 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 Label. Use the AddLabel method to add a new Label to a worksheet.
Properties
AltHTML | |
Application |
Gets an Application object that represents the creator of the Label. |
Border | |
Bottom |
Gets the distance, in points, between the bottom edge of the Label 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 Label. |
Creator |
Gets a value that indicates the application in which the Label was created. |
Height |
Gets or sets the height of the Label. |
Index |
Gets the index number of the Label within the collection of OLEObjects on the sheet. |
Interior |
Gets an Interior object that represents the interior of the Label. |
Left |
Gets or sets the distance, in points, between the left edge of the Label and the left edge of the worksheet. |
Locked |
Gets or sets a value that indicates whether the Label 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 Label. |
Placement |
Gets or sets an object that indicates the way the Label is attached to the cells below it. |
PrintObject |
Gets or sets a value that indicates whether the Label is printed when the worksheet is printed. |
Right |
Gets the distance, in points, between the right edge of the Label and the left edge of the worksheet. |
ShapeRange |
Gets a ShapeRange object that represents the Label. |
SourceName |
Gets or sets the link source name of the Label. |
Top |
Gets or sets the distance, in points, between the top edge of the Label 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 Label. |
Visible |
Gets or sets a value that represents whether the Label is visible. |
Width |
Gets or sets the width of the Label in points. |
ZOrder |
Gets the z-order position of the Label. |
Methods
Activate() |
Activates the Label. |
BringToFront() |
Brings the Label to the front of the z-order. |
CopyPicture(XlPictureAppearance, XlCopyPictureFormat) |
Copies the Label to the Clipboard as a picture. |
Delete() |
Deletes a dynamically created Label from the worksheet and removes it from the ControlCollection. |
Select(Object) |
Selects the Label. |
SendToBack() |
Sends the Label to the back of the z-order. |
SetVisibleCore(Boolean) |
Sets the Label to the specified visible state. |
Update() |