Bewerken

Share via


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]

Gets or sets a TabPage in the collection.

public:
 virtual property System::Windows::Forms::TabPage ^ default[int] { System::Windows::Forms::TabPage ^ get(int index); void set(int index, System::Windows::Forms::TabPage ^ value); };
public virtual System.Windows.Forms.TabPage this[int index] { get; set; }
member this.Item(int) : System.Windows.Forms.TabPage with get, set
Default Public Overridable Property Item(index As Integer) As TabPage

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

Item[String]

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

public:
 virtual property System::Windows::Forms::TabPage ^ default[System::String ^] { System::Windows::Forms::TabPage ^ get(System::String ^ key); };
public virtual System.Windows.Forms.TabPage this[string key] { get; }
public virtual System.Windows.Forms.TabPage? this[string? key] { get; }
member this.Item(string) : System.Windows.Forms.TabPage
Default Public Overridable ReadOnly Property Item(key As String) As TabPage

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