StatusStrip
A StatusStrip
displays window status. It is usually at the bottom of a window. We use a ToolStripStatusLabel
hyperlink in the C# Windows Forms status bar.
The StatusStrip
is a control in your Toolbox in Visual Studio. Double
click on its icon and then it will appear in the tray at the bottom of the Visual Studio window.
Double
-click on the ToolStripStatusLabel
you want to turn into a hyperlink. We must use the Click event handler to make the status item do something when it is clicked.
Process.Start
method in System.Diagnostics
.System.Diagnostics
.private void toolStripStatusLabel3_Click(object sender, EventArgs e)
{
// Launch Dot Net Perls website.
// ... You should change the URL!
System.Diagnostics.Process.Start( "https://www.dotnetperls.com/");
}
All of the items will be squished to the left of the status strip by default. We can change this, and right-align a label.
StatusStrip
we add the Spring property on an item in between the left and right items.Please open the Items dialog in Visual Studio. On your StatusStrip
, open the Items Collection
Editor dialog in the A-Z listing.
Collection
Editor dialog is pictured in the screenshot here. It will look different in your version of Visual Studio.We added a StatusStrip
. We used the example of a right-aligned hyperlink to show how the system works. A simple hyperlink in the status bar is good for branding.