ToolStripStatusLabel Class
Assembly: System.Windows.Forms (in system.windows.forms.dll)
A ToolStripStatusLabel represents an individual panel of a StatusStrip control. A ToolStripStatusLabel can contain text or an icon that reflects the status of an application. Use the ToolStripItemCollection class to find, add, or remove ToolStripStatusLabel objects.
Although ToolStripStatusLabel replaces and adds functionality to the StatusBarPanel control of previous versions, StatusBarPanel is retained for both backward compatibility and future use if you choose.
The following code example demonstrates a ToolStripStatusLabel with various common properties set.
Imports System Imports System.Text Imports System.Windows.Forms Public Class Form1 Inherits Form Private statusStrip1 As StatusStrip Private toolStripStatusLabel1 As ToolStripStatusLabel Public Sub New() InitializeComponent() End Sub <STAThread()> _ Shared Sub Main() Application.EnableVisualStyles() Application.Run(New Form1()) End Sub Private Sub InitializeComponent() statusStrip1 = New System.Windows.Forms.StatusStrip() toolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel() statusStrip1.SuspendLayout() SuspendLayout() ' ' statusStrip1 ' statusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {toolStripStatusLabel1}) statusStrip1.Location = New System.Drawing.Point(0, 248) statusStrip1.Name = "statusStrip1" statusStrip1.Size = New System.Drawing.Size(292, 25) statusStrip1.TabIndex = 0 statusStrip1.Text = "statusStrip1" ' ' toolStripStatusLabel1.BorderSides = CType(System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom, System.Windows.Forms.ToolStripStatusLabelBorderSides) toolStripStatusLabel1.BorderStyle = System.Windows.Forms.Border3DStyle.Raised toolStripStatusLabel1.IsLink = True toolStripStatusLabel1.Name = "toolStripStatusLabel1" toolStripStatusLabel1.Size = New System.Drawing.Size(246, 20) toolStripStatusLabel1.Spring = True toolStripStatusLabel1.Text = "toolStripStatusLabel1" toolStripStatusLabel1.Alignment = ToolStripItemAlignment.Left ' Form1 ' ClientSize = New System.Drawing.Size(292, 273) Controls.Add(statusStrip1) Name = "Form1" statusStrip1.ResumeLayout(False) statusStrip1.PerformLayout() ResumeLayout(False) PerformLayout() End Sub End Class
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.ToolStripItem
System.Windows.Forms.ToolStripLabel
System.Windows.Forms.ToolStripStatusLabel
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.