Skip to main content

TabPageCollection.Insert(Int32, TabPage) Method

Inserts the specified tab page object into the collection at the specified index.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web


public void Insert(
    int index,
    TabPage tabPage


Name Type Description
index Int32

The zero-based index location where a specific tab page object should be inserted.

tabPage TabPage

A TabPage object representing the tab page to insert into the tab page collection.


This method allows an existing tab page object to be inserted into the current tab page collection.

If the index parameter value is negative or exceeds the number of elements within the collection, a ArgumentOutOfRangeException exception is raised. When inserting a new tab page, the elements that follow the insertion point move down to accommodate the new element. The indexes of the moved elements are updated as well.

To append a tab page object to the collection, use the TabPageCollection.Add method. To remove the previously added tab page, use the TabPageCollection.Remove method. You can also use the Clear() method to remove all tab pages from the collection.

See Also