This documentation is archived and is not being maintained.

ToolStripStatusLabel.Spring Property

Gets or sets a value indicating whether the ToolStripStatusLabel automatically fills the available space on the StatusStrip as the form is resized.

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

public bool Spring { get; set; }

Property Value

Type: System.Boolean
true if the ToolStripStatusLabel automatically fills the available space on the StatusStrip as the form is resized; otherwise, false. The default is false.

Set the Spring property to true to enable the ToolStripStatusLabel to smoothly resize along with its container.

The following code example demonstrates the syntax for various ToolStripStatusLabel common properties, including the Spring property.

// 
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;

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: