Freigeben über


ToolboxItemCollection-Konstruktor (ToolboxItem )

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

Namespace: System.Drawing.Design
Assembly: System.Drawing (in system.drawing.dll)

Syntax

'Declaration
Public Sub New ( _
    value As ToolboxItem() _
)
'Usage
Dim value As ToolboxItem()

Dim instance As New ToolboxItemCollection(value)
public ToolboxItemCollection (
    ToolboxItem[] value
)
public:
ToolboxItemCollection (
    array<ToolboxItem^>^ value
)
public ToolboxItemCollection (
    ToolboxItem[] value
)
public function ToolboxItemCollection (
    value : ToolboxItem[]
)

Parameter

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

Beispiel

Im folgenden Codebeispiel wird das Erstellen einer neuen ToolboxItemCollection-Instanz veranschaulicht, die mit einem Array von ToolboxItem-Objekten initialisiert wird.

' 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))})
// 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.
array<ToolboxItem^>^temp0 = {gcnew ToolboxItem( System::Windows::Forms::Label::typeid ),gcnew ToolboxItem( System::Windows::Forms::TextBox::typeid )};
ToolboxItemCollection^ collection = gcnew ToolboxItemCollection( temp0 );

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

ToolboxItemCollection-Klasse
ToolboxItemCollection-Member
System.Drawing.Design-Namespace