ToolboxItemCollection Constructors
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.
Initializes a new instance of the ToolboxItemCollection class.
Overloads
ToolboxItemCollection(ToolboxItem[]) |
Initializes a new instance of the ToolboxItemCollection class using the specified array of toolbox items. |
ToolboxItemCollection(ToolboxItemCollection) |
Initializes a new instance of the ToolboxItemCollection class using the specified collection. |
ToolboxItemCollection(ToolboxItem[])
Initializes a new instance of the ToolboxItemCollection class using the specified array of toolbox items.
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())
Parameters
- value
- ToolboxItem[]
An array of type ToolboxItem containing the toolbox items to fill the collection with.
Examples
The following code example demonstrates creating a new ToolboxItemCollection instance initialized using an array of ToolboxItem objects.
// 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))})
Applies to
ToolboxItemCollection(ToolboxItemCollection)
Initializes a new instance of the ToolboxItemCollection class using the specified collection.
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)
Parameters
- value
- ToolboxItemCollection
A ToolboxItemCollection to fill the new collection with.
Examples
The following code example demonstrates creating a new ToolboxItemCollection instance initialized using another 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)