Modifier

Partager via


StatusBar.StatusBarPanelCollection.Item[] Property

Definition

Gets or sets an item within the collection.

Overloads

Item[String]

Gets an item with the specified key from the collection.

Item[Int32]

Gets or sets the StatusBarPanel at the specified index.

Item[String]

Gets an item with the specified key from the collection.

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

Parameters

key
String

The name of the item to retrieve from the collection.

Property Value

The StatusBarPanel with the specified key.

Remarks

The Name property corresponds to the key for a StatusBarPanel in the StatusBar.StatusBarPanelCollection.

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

Applies to

Item[Int32]

Gets or sets the StatusBarPanel at the specified index.

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

Parameters

index
Int32

The index of the panel in the collection to get or set.

Property Value

A StatusBarPanel representing the panel located at the specified index within the collection.

Exceptions

The index parameter is less than zero or greater than or equal to the value of the Count property of the StatusBar.StatusBarPanelCollection class.

The StatusBarPanel assigned to the collection was null.

Remarks

You can use this method to obtain the StatusBarPanel stored at a specific location within the collection. To determine the index of a specific panel within the collection, use the IndexOf method.

See also

Applies to