StatusBar.StatusBarPanelCollection.AddRange(StatusBarPanel[]) 方法
定义
向集合中添加 StatusBarPanel 对象的数组。Adds an array of StatusBarPanel objects to the collection.
public:
virtual void AddRange(cli::array <System::Windows::Forms::StatusBarPanel ^> ^ panels);
public virtual void AddRange (System.Windows.Forms.StatusBarPanel[] panels);
abstract member AddRange : System.Windows.Forms.StatusBarPanel[] -> unit
override this.AddRange : System.Windows.Forms.StatusBarPanel[] -> unit
Public Overridable Sub AddRange (panels As StatusBarPanel())
参数
- panels
- StatusBarPanel[]
要添加的 StatusBarPanel 对象的数组。An array of StatusBarPanel objects to add.
例外
要添加到集合中的 StatusBarPanel 对象的数组为 null。The array of StatusBarPanel objects being added to the collection was null.
注解
您可以将面板添加到 StatusBar 控件以显示多种类型的信息。You can add panels to a StatusBar control to display more than one type of information. AddRange方法将 StatusBarPanel 参数中指定的对象数组添加 panels 到集合中。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. 面板位于的顺序 StatusBar.StatusBarPanelCollection 表示面板在控件中的显示顺序 StatusBar 。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. RightToLeft控件的属性 StatusBar 不会更改面板在中的显示顺序 StatusBar 。The RightToLeft property of the StatusBar control does not change the order in which panels are displayed in the StatusBar. 若要向 StatusBarPanel 集合中添加单个,请使用 Add 方法。To add a single StatusBarPanel to the collection, use the Add method. 若要在 StatusBar 控件 (和此集合中的特定位置插入面板) ,请使用 Insert 方法。To insert a panel at a specific position in the StatusBar control (and in this collection), use the Insert method.