Share via


ToolboxItemCollection Konstruktoren

Definition

Initialisiert eine neue Instanz der ToolboxItemCollection-Klasse.

Überlädt

ToolboxItemCollection(ToolboxItem[])

Initialisiert eine neue Instanz der ToolboxItemCollection-Klasse unter Verwendung des angegebenen Arrays von Toolboxelementen.

ToolboxItemCollection(ToolboxItemCollection)

Initialisiert eine neue Instanz der ToolboxItemCollection-Klasse unter Verwendung der angegebenen Auflistung.

ToolboxItemCollection(ToolboxItem[])

Initialisiert eine neue Instanz der ToolboxItemCollection-Klasse unter Verwendung des angegebenen Arrays von Toolboxelementen.

public:
 ToolboxItemCollection(cli::array <System::Drawing::Design::ToolboxItem ^> ^ value);
public ToolboxItemCollection (System.Drawing.Design.ToolboxItem[] value);
new System.Drawing.Design.ToolboxItemCollection : System.Drawing.Design.ToolboxItem[] -> System.Drawing.Design.ToolboxItemCollection
Public Sub New (value As ToolboxItem())

Parameter

value
ToolboxItem[]

Ein Array vom Typ ToolboxItem, das die Toolboxelemente für das Auffüllen der Auflistung enthält.

Beispiele

Im folgenden Codebeispiel wird das Erstellen einer neuen ToolboxItemCollection instance veranschaulicht, die mithilfe eines Arrays von ToolboxItem -Objekten initialisiert wird.

// Create a new ToolboxItemCollection using a ToolboxItem array.
array<ToolboxItem^>^temp0 = {gcnew ToolboxItem( System::Windows::Forms::Label::typeid ),gcnew ToolboxItem( System::Windows::Forms::TextBox::typeid )};
ToolboxItemCollection^ collection = gcnew ToolboxItemCollection( temp0 );
// Create a new ToolboxItemCollection using a ToolboxItem array.
ToolboxItemCollection collection = 
    new ToolboxItemCollection( new ToolboxItem[] { 
        new ToolboxItem(typeof(System.Windows.Forms.Label)),
        new ToolboxItem(typeof(System.Windows.Forms.TextBox)) } );
' Create a new ToolboxItemCollection using a ToolboxItem array.
Dim collection As New ToolboxItemCollection(New ToolboxItem() _
 {New ToolboxItem(GetType(System.Windows.Forms.Label)), _
  New ToolboxItem(GetType(System.Windows.Forms.TextBox))})

Gilt für:

ToolboxItemCollection(ToolboxItemCollection)

Initialisiert eine neue Instanz der ToolboxItemCollection-Klasse unter Verwendung der angegebenen Auflistung.

public:
 ToolboxItemCollection(System::Drawing::Design::ToolboxItemCollection ^ value);
public ToolboxItemCollection (System.Drawing.Design.ToolboxItemCollection value);
new System.Drawing.Design.ToolboxItemCollection : System.Drawing.Design.ToolboxItemCollection -> System.Drawing.Design.ToolboxItemCollection
Public Sub New (value As ToolboxItemCollection)

Parameter

value
ToolboxItemCollection

Eine ToolboxItemCollection, mit der die neue Auflistung aufgefüllt werden soll.

Beispiele

Im folgenden Codebeispiel wird das Erstellen einer neuen ToolboxItemCollection instance veranschaulicht, die mit einem anderen ToolboxItemCollectioninitialisiert wird.

// Create a new ToolboxItemCollection using an existing ToolboxItemCollection.
ToolboxItemCollection^ coll = gcnew ToolboxItemCollection( collection );
// Create a new ToolboxItemCollection using an existing ToolboxItemCollection.
ToolboxItemCollection coll =
    new ToolboxItemCollection( collection );
' Creates a new ToolboxItemCollection using an existing ToolboxItemCollection.
Dim coll As New ToolboxItemCollection(collection)

Gilt für: