Export (0) Print
Expand All

StatusBar.StatusBarPanelCollection.Add Method (String)

Adds a StatusBarPanel with the specified text to the collection.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual StatusBarPanel Add(
	string text
)

Parameters

text
Type: System.String

The text for the StatusBarPanel that is being added.

Return Value

Type: System.Windows.Forms.StatusBarPanel
A StatusBarPanel that represents the panel that was added to the collection.

You can add panels to a StatusBar control to display more than one type of information. This version of the Add method creates a new StatusBarPanel with the text specified in the text parameter and adds it to collection. The order in which panels are located in the StatusBar.StatusBarPanelCollection represents the order that panels are displayed within the StatusBar control. Panels are displayed from left to right starting with the first panel in the collection. The RightToLeft property of the StatusBar control does not change the order in which panels are displayed in the StatusBar. To insert a panel at a specific position in the collection, use the Insert method. To add a set of panels to the collection in a single operation, use the AddRange method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft