Redigeeri

Jagamisviis:


TabControl.TabPageCollection.Insert Method

Definition

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

Overloads

Insert(Int32, String, String, String)

Creates a tab page with the specified key, text, and image, and inserts it into the collection at the specified index.

Insert(Int32, String, String)

Creates a new tab page with the specified key and text, and inserts it into the collection at the specified index.

Insert(Int32, String, String, Int32)

Creates a new tab page with the specified key, text, and image, and inserts it into the collection at the specified index.

Insert(Int32, String)

Creates a new tab page with the specified text and inserts it into the collection at the specified index.

Insert(Int32, TabPage)

Inserts an existing tab page into the collection at the specified index.

Insert(Int32, String, String, String)

Creates a tab page with the specified key, text, and image, and inserts it into the collection at the specified index.

public:
 void Insert(int index, System::String ^ key, System::String ^ text, System::String ^ imageKey);
public void Insert (int index, string key, string text, string imageKey);
public void Insert (int index, string? key, string? text, string imageKey);
member this.Insert : int * string * string * string -> unit
Public Sub Insert (index As Integer, key As String, text As String, imageKey As String)

Parameters

index
Int32

The zero-based index location where the tab page is inserted.

key
String

The name of the tab page.

text
String

The text to display on the tab page.

imageKey
String

The key of the image to display on the tab page.

Remarks

The Name property corresponds to the key for a TabPage in the TabControl.TabPageCollection.

The Insert method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the Add method. If you want to add an array of items to the collection, use the AddRange method.

The imageKey parameter refers to an image in the ImageList property of the TabControl.

Applies to

Insert(Int32, String, String)

Creates a new tab page with the specified key and text, and inserts it into the collection at the specified index.

public:
 void Insert(int index, System::String ^ key, System::String ^ text);
public void Insert (int index, string key, string text);
public void Insert (int index, string? key, string? text);
member this.Insert : int * string * string -> unit
Public Sub Insert (index As Integer, key As String, text As String)

Parameters

index
Int32

The zero-based index location where the tab page is inserted.

key
String

The name of the tab page.

text
String

The text to display on the tab page.

Remarks

The Name property corresponds to the key for a TabPage in the TabControl.TabPageCollection.

The Insert method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the Add method. If you want to add an array of items to the collection, use the AddRange method.

Applies to

Insert(Int32, String, String, Int32)

Creates a new tab page with the specified key, text, and image, and inserts it into the collection at the specified index.

public:
 void Insert(int index, System::String ^ key, System::String ^ text, int imageIndex);
public void Insert (int index, string key, string text, int imageIndex);
public void Insert (int index, string? key, string? text, int imageIndex);
member this.Insert : int * string * string * int -> unit
Public Sub Insert (index As Integer, key As String, text As String, imageIndex As Integer)

Parameters

index
Int32

The zero-based index location where the tab page is inserted.

key
String

The name of the tab page.

text
String

The text to display on the tab page.

imageIndex
Int32

The zero-based index of the image to display on the tab page.

Remarks

The Name property corresponds to the key for a TabPage in the TabControl.TabPageCollection.

The Insert method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the Add method. If you want to add an array of items to the collection, use the AddRange method.

The imageIndex parameter refers to an image in the ImageList property of the TabControl.

Applies to

Insert(Int32, String)

Creates a new tab page with the specified text and inserts it into the collection at the specified index.

public:
 void Insert(int index, System::String ^ text);
public void Insert (int index, string text);
public void Insert (int index, string? text);
member this.Insert : int * string -> unit
Public Sub Insert (index As Integer, text As String)

Parameters

index
Int32

The zero-based index location where the tab page is inserted.

text
String

The text to display in the tab page.

Remarks

The Insert method allows you to create a new tab page and insert it at a specified location. To add a tab page without specifying a particular position in the collection, use the Add method. If you want to add an array of items to the collection, use the AddRange method.

Applies to

Insert(Int32, TabPage)

Inserts an existing tab page into the collection at the specified index.

public:
 void Insert(int index, System::Windows::Forms::TabPage ^ tabPage);
public void Insert (int index, System.Windows.Forms.TabPage tabPage);
member this.Insert : int * System.Windows.Forms.TabPage -> unit
Public Sub Insert (index As Integer, tabPage As TabPage)

Parameters

index
Int32

The zero-based index location where the tab page is inserted.

tabPage
TabPage

The TabPage to insert in the collection.

Remarks

The Insert method allows you to insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the Add method. If you want to add an array of items to the collection, use the AddRange method.

Applies to