Share via


ToolboxItemCollection Construtores

Definição

Inicializa uma nova instância da classe ToolboxItemCollection.

Sobrecargas

ToolboxItemCollection(ToolboxItem[])

Inicializa uma nova instância da classe ToolboxItemCollection usando a matriz de itens de caixa de ferramentas especificada.

ToolboxItemCollection(ToolboxItemCollection)

Inicializa uma nova instância da classe ToolboxItemCollection usando a coleção especificada.

ToolboxItemCollection(ToolboxItem[])

Inicializa uma nova instância da classe ToolboxItemCollection usando a matriz de itens de caixa de ferramentas especificada.

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())

Parâmetros

value
ToolboxItem[]

Uma matriz do tipo ToolboxItem que contém os itens de caixa de ferramentas para preencher a coleção.

Exemplos

O exemplo de código a seguir demonstra a criação de uma nova ToolboxItemCollection instância inicializada usando uma matriz de ToolboxItem objetos .

// 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))})

Aplica-se a

ToolboxItemCollection(ToolboxItemCollection)

Inicializa uma nova instância da classe ToolboxItemCollection usando a coleção especificada.

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)

Parâmetros

value
ToolboxItemCollection

Um ToolboxItemCollection para preencher a nova coleção.

Exemplos

O exemplo de código a seguir demonstra como criar uma nova ToolboxItemCollection instância inicializada usando outro ToolboxItemCollection.

// 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)

Aplica-se a