TabControl.TabPageCollection.Item[] Property

Definition

Gets or sets a tab page in the collection.

Overloads

Item[Int32]

Gets or sets a TabPage in the collection.

Item[String]

Gets a tab page with the specified key from the collection.

Item[Int32]

Source:
TabControl.TabPageCollection.cs
Source:
TabControl.TabPageCollection.cs
Source:
TabControl.TabPageCollection.cs

Gets or sets a TabPage in the collection.

C#
public virtual System.Windows.Forms.TabPage this[int index] { get; set; }

Parameters

index
Int32

The zero-based index of the tab page to get or set.

Property Value

The TabPage at the specified index.

Exceptions

index is less than zero or greater than the highest available index.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Item[String]

Source:
TabControl.TabPageCollection.cs
Source:
TabControl.TabPageCollection.cs
Source:
TabControl.TabPageCollection.cs

Gets a tab page with the specified key from the collection.

C#
public virtual System.Windows.Forms.TabPage this[string key] { get; }
C#
public virtual System.Windows.Forms.TabPage? this[string? key] { get; }

Parameters

key
String

The name of the tab page to retrieve.

Property Value

The TabPage with the specified key.

Remarks

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

The key comparison is not case-sensitive. If the key parameter is null or an empty string, Item[] returns null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9