AddRange Method
This documentation is archived and is not being maintained.

StatusBar.StatusBarPanelCollection.AddRange Method

Adds an array of StatusBarPanel objects to the collection.

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

public virtual void AddRange(
	StatusBarPanel[] panels


Type: System.Windows.Forms.StatusBarPanel[]
An array of StatusBarPanel objects to add.


The array of StatusBarPanel objects being added to the collection was null.

You can add panels to a StatusBar control to display more than one type of information. The AddRange method adds an array of StatusBarPanel objects specified in the panels parameter to the collection. All existing panels in the collection are removed from the collection before inserting new panels. 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 add a single StatusBarPanel to the collection, use the Add method. To insert a panel at a specific position in the StatusBar control (and in this collection), use the Insert method.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
© 2016 Microsoft