Button Klasse
Definition
Stellt eine Windows Forms-Schaltfläche dar, die einem Microsoft Office Excel-Arbeitsblatt hinzugefügt werden kann.Represents a Windows Forms button that can be added to a Microsoft Office Excel worksheet.
[System.ComponentModel.DefaultEvent("Click")]
[System.ComponentModel.DefaultProperty("Text")]
[System.ComponentModel.ToolboxItem(false)]
public class Button : System.Windows.Forms.Button
- Vererbung
-
Button
- Attribute
Hinweise
Die Microsoft.Office.Tools.Excel.Controls.Button unterscheidet sich von einer System.Windows.Forms.Button .The Microsoft.Office.Tools.Excel.Controls.Button is different from a System.Windows.Forms.Button. Der Microsoft.Office.Tools.Excel.Controls.Button verfügt über zusätzliche Member, die das Hinzufügen zu einem Excel-Arbeitsblatt ermöglichen und ihm zusätzliche Methoden und Eigenschaften bereitstellen.The Microsoft.Office.Tools.Excel.Controls.Button has additional members that enable it to be added to an Excel worksheet and that give it additional methods and properties.
Verwenden Sie den- New
Konstruktor nicht, um ein neues zu erstellen Button .Do not use the New
constructor to create a new Button. Verwenden Sie die- AddButton Methode, um einem Arbeitsblatt ein neues hinzuzufügen Button .Use the AddButton method to add a new Button to a worksheet.
Eigenschaften
AltHTML | |
Application |
Ruft ein Application-Objekt ab, das den Ersteller von Button darstellt.Gets an Application object that represents the creator of the Button. |
Border |
Ruft einen Border ab, der den Rahmen von Button darstellt.Gets a Border that represents the border of the Button. |
Bottom |
Ruft die Entfernung zwischen dem unteren Rand von Button und dem oberen Rand des Arbeitsblatts in Punkt ab oder legt diese fest.Gets the distance, in points, between the bottom edge of the Button and the top edge of the worksheet. |
BottomRightCell |
Ruft ein Range-Objekt ab, das die Zelle darstellt, die sich unter der unteren rechten Ecke von Button befindet.Gets a Range object that represents the cell that lies under the lower-right corner of the Button. |
Creator |
Ruft einen Wert ab, der die Anwendung angibt, in der Button erstellt wurde.Gets a value that indicates the application in which the Button was created. |
Height |
Ruft die Höhe des Button ab oder legt diese fest.Gets or sets the height of the Button. |
Index |
Ruft die Indexnummer von Button innerhalb der Auflistung von OLEObjects auf dem Blatt ab oder legt diese fest.Gets the index number of the Button within the collection of OLEObjects on the sheet. |
Interior |
Ruft ein Interior-Objekt ab, das das Innere von Button darstellt.Gets an Interior object that represents the interior of the Button. |
Left |
Ruft die Entfernung zwischen dem linken Rand von Button und dem linken Rand des Arbeitsblatts in Punkt ab oder legt diese fest.Gets or sets the distance, in points, between the left edge of the Button and the left edge of the worksheet. |
Locked |
Ruft einen Wert ab, der angibt, ob Button zur Entwurfszeit geändert werden kann, wenn das Blatt geschützt ist, oder legt diesen fest.Gets or sets a value that indicates whether the Button can be modified at design time when the sheet is protected. |
OLEType |
Ruft einen Wert ab, der den OLE-Objekttyp darstellt.Gets a value that represents the OLE object type. |
OnAction | |
Parent |
Ruft das übergeordnete Objekt für das Button-Element ab.Gets the parent object for the Button. |
Placement |
Ruft ein Objekt ab, das angibt, wie Button an die darunter liegenden Zellen angefügt wird, oder legt dieses Objekt fest.Gets or sets an object that indicates the way the Button is attached to the cells below it. |
PrintObject |
Ruft einen Wert ab, der angibt, ob Button beim Drucken des Arbeitsblatts gedruckt wird, oder ruft diesen ab.Gets or sets a value that indicates whether the Button is printed when the worksheet is printed. |
Right |
Ruft die Entfernung zwischen dem rechten Rand von Button und dem linken Rand des Arbeitsblatts in Punkt ab oder legt diese fest.Gets the distance, in points, between the right edge of the Button and the left edge of the worksheet. |
ShapeRange |
Ruft ein ShapeRange-Objekt ab, das Button darstellt.Gets a ShapeRange object that represents the Button. |
SourceName |
Ruft den Namen für die Linkquelle des Button-Elements ab oder legt diesen fest.Gets or sets the link source name of the Button. |
Top |
Ruft die Entfernung zwischen dem oberen Rand von Button und dem oberen Rand des Arbeitsblatts in Punkt ab oder legt diese fest.Gets or sets the distance, in points, between the top edge of the Button and the top edge of the worksheet. |
TopLeftCell |
Ruft ein Range-Objekt ab, das die Zelle darstellt, die sich unter der oberen linken Ecke von Button befindet.Gets a Range object that represents the cell that lies under the upper-left corner of the Button. |
Visible |
Ruft einen Wert ab, der darstellt, ob Button angezeigt wird, oder legt diesen fest.Gets or sets a value that represents whether the Button is visible. |
Width |
Ruft die Breite von Button in Punkt ab oder legt diese fest.Gets or sets the width of the Button in points. |
ZOrder |
Ruft die Position der z-Reihenfolge für Button ab.Gets the z-order position of the Button. |
Methoden
Activate() | |
BringToFront() |
Verschiebt Button in den Vordergrund der z-Reihenfolge.Brings the Button to the front of the z-order. |
CopyPicture(XlPictureAppearance, XlCopyPictureFormat) |
Kopiert Button als Bild in die Zwischenablage.Copies the Button to the Clipboard as a picture. |
Delete() |
Löscht dynamisch erstellte Button aus dem Arbeitsblatt und entfernt diese aus der ControlCollection.Deletes a dynamically created Button from the worksheet and removes it from the ControlCollection. |
Select(Object) | |
SendToBack() |
Verschiebt Button in den Hintergrund der z-Reihenfolge.Sends the Button to the back of the z-order. |
SetVisibleCore(Boolean) |
Legt die Button auf den angegebenen sichtbaren Zustand fest.Sets the Button to the specified visible state. |
Update() |