Actualización: noviembre 2007
Representa un panel de un control StatusStrip.
Ensamblado: System.Windows.Forms (en System.Windows.Forms.dll)
<ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability.StatusStrip)> _ Public Class ToolStripStatusLabel _ Inherits ToolStripLabel
Dim instance As ToolStripStatusLabel
[ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability.StatusStrip)] public class ToolStripStatusLabel : ToolStripLabel
[ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability::StatusStrip)] public ref class ToolStripStatusLabel : public ToolStripLabel
/** @attribute ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability.StatusStrip) */ public class ToolStripStatusLabel extends ToolStripLabel
public class ToolStripStatusLabel extends ToolStripLabel
ToolStripStatusLabel es una versión de ToolStripLabel diseñada específicamente para su uso en StatusStrip. Las características especiales incluyen BorderStyle, BorderSides y Spring.
Un control ToolStripStatusLabel puede contener texto o un icono que refleja el estado de una aplicación. Utilice la clase ToolStripItemCollection para encontrar, agregar o quitar controles ToolStripStatusLabel.
Aunque ToolStripStatusLabel reemplaza al control StatusBarPanel de las versiones anteriores y su funcionalidad es mayor, el control StatusBarPanel se ha mantenido para preservar la compatibilidad con las versiones anteriores y para que pueda utilizarse en el futuro, si se diera el caso.
En el ejemplo de código siguiente se muestra un ToolStripStatusLabel con varias propiedades comunes establecidas.
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
using System; using System.Text; using System.Windows.Forms; namespace WindowsApplication5 { public class Form1 : Form { private StatusStrip statusStrip1; private ToolStripStatusLabel toolStripStatusLabel1; public Form1() { InitializeComponent(); } [STAThread] static void Main() { Application.EnableVisualStyles(); Application.Run(new Form1()); } private void 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 = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); 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(); } } }
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.ToolStripItem
System.Windows.Forms.ToolStripLabel
System.Windows.Forms.ToolStripStatusLabel
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.