ToolBar.ToolBarButtonCollection.IList.Add Method (Object)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

Adds the specified toolbar button to the end of the toolbar button collection.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

int IList.Add(
	object button
)

Parameters

button
Type: System.Object

The ToolBarButton to be added after all existing buttons.

Return Value

Type: System.Int32

The zero-based index value of the ToolBarButton added to the collection.

Exception Condition
ArgumentException

button is not a ToolBarButton.

This member is an explicit interface member implementation. It can be used only when the ToolBar.ToolBarButtonCollection is cast to an IList interface.

.NET Framework
Available since 1.1
Return to top
Show: