Getting Started with Windows Forms StatusStrip

18 Nov 20187 minutes to read

Essential Tools has come up with StatusStrip control which can be added to the bottom of the Ribbon. It can hold controls like TrackBarEx, ProgressBar, StatusStripButtons, and so on.

WindowsForms Status Strip added to bottom of the ribbon

Creating a StatusStrip

Through designer

The StatusStrip can be added to the form by dragging a StatusStripEx control from the Toolbox. It can be docked to the bottom of the RibbonControlAdv.

Creating a StatusStrip through designer

Dock the StatusStrip control to the bottom using Dock property.

Docked the StatusStrip to bottom

Adding items to the StatusStrip

Access the Items property of the control, to open the Items Collection Editor. Use this editor to add customized StatusControl items. The Editor will let you modify the look and feel of the items using the properties provided on it right side.

Adding items to the StatusStrip

A shortcut to add the ToolStripStatus Items is through Tasks Window. See Smart Tag options to know more.

Through code

StatusStrip can be created programmatically using the code below. This code snippet adds a ToolStripStatus Label to the StatusStrip control.

using Syncfusion.Windows.Forms.Tools;

//Declaring the StatusStripEx and ToolStripStatusLabel
private Syncfusion.Windows.Forms.Tools.StatusStripEx statusStripEx1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;

//Initializing the StatusStripEx and ToolStripStatusLabel
this.statusStripEx1 = new Syncfusion.Windows.Forms.Tools.StatusStripEx();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();

//Adding ToolStripStatusLabel to StatusStripEx
this.statusStripEx1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1});
this.Controls.Add(this.statusStripEx1);

//Docking the StatusStripEx to Bottom
this.statusStripEx1.Dock = Syncfusion.Windows.Forms.Tools.DockStyleEx.Bottom;
Imports Syncfusion.Windows.Forms.Tools

'Declaring the StatusStripEx and ToolStripStatusLabel 
Private statusStripEx1 As Syncfusion.Windows.Forms.Tools.StatusStripEx
Private toolStripStatusLabel1 As System.Windows.Forms.ToolStripStatusLabel

'Initializing the StatusStripEx and ToolStripStatusLabel 
Me.statusStripEx1 = New Syncfusion.Windows.Forms.Tools.StatusStripEx() 
Me.toolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel() 

'Adding ToolStripStatusLabel to StatusStripEx 
Me.statusStripEx1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStripStatusLabel1}) 
Me.Controls.Add(Me.statusStripEx1)

'Docking the StatusStripEx to Bottom'
Me.statusStripEx1.Dock = Syncfusion.Windows.Forms.Tools.DockStyleEx.Bottom

StatusStrip Items

The StatusStripEx control has two types of items.

  • StatusControl items

  • Notification items

StatusControl items

The StatusControl items is placed to right side of the StatusStrip when added. The StatusControl items are listed below,

  • StatusLabel
  • ProgressBar
  • DropDownButton
  • SplitButton

Notification items

The Notification items is placed to left side of the StatusStrip when added. The Notification items are listed below,

  • StatusStripLabel
  • StatusStripProgressBar
  • StatusStripDropDownButton
  • StatusStripSplitButton

StatusControl items and Notification items are same type of items. For example, If you select StatusStripLabel, it will be added to the left side of StatusStrip. Similarly, if you select StatusLabel, it will be added to the right side of StatusStrip.

Smart tag options

Clicking the Smart Tag of the StatusStrip, displays the below Tasks window. This window lets you add ToolStripStatus Items.

Smart tag options available in StatusStrip

The options are,

  • Dock - Provides docking options for StatusStrip control.

StatusControl items

Methods Description
Add StatusLabel Represents that adds a status label item.
Add ProgressBar Represents that adds a ProgressBar item.
Add DropDownButton Represents that adds a dropdown button item.
Add SplitButton Represents that adds a split button item.
Add PanelItem Represents that adds a Panel item.
Add TrackBarItem Represents that adds a TrackBar item.

Notifications items

Methods Description
Add StatusStripButton Represents that adds a Button item.
Add StatusStripLabel Represents that adds status strip label item.
Add StatusStrip ProgressBar Represents that adds progressbar to the status bar
Add StatusStrip DropDownButton Represents that adds dropdown button to the status bar.
Add StatusStrip SplitButton Represents that adds split button to the status bar.
Add StatusStrip PanelItem Represents that adds panel item to the status bar.

SizingGrip settings

The StatusStrip control has a sizing grip at its bottom right corner. This sizing grip can be shown or hidden using SizingGrip property. The below properties controls the appearance of the sizing grip.

Property Description
GripStyle Specifies the style of the sizing grip.
GripMargin Gets or sets the margin for the sizing grip.
this.statusStripEx1.SizingGrip = true;
this.statusStripEx1.GripStyle = ToolStripGripStyle.Visible;
this.statusStripEx1.GripMargin = new Padding(5);
Me.statusStripEx1.SizingGrip = True
Me.statusStripEx1.GripStyle = ToolStripGripStyle.Visible
Me.statusStripEx1.GripMargin = New Padding(5)

ColorSchemes for StatusStrip

StatusStrip supports all the three color schemes, i.e., Silver, Blue and Black schemes of Office2007. It can be changed using OfficeColorScheme property.

Tooltips

this.statusStripEx1.OfficeColorScheme = Syncfusion.Windows.Forms.Tools.ToolStripEx.ColorScheme.Silver;
Me.statusStripEx1.OfficeColorScheme = Syncfusion.Windows.Forms.Tools.ToolStripEx.ColorScheme.Silver

Silver color scheme for WindowsForms Status Strip

Blue color scheme for WindowsForms Status Strip

Black color scheme for WindowsForms Status Strip

Visual style

StatusStrip control supports Office2016 Visual styles such as Office2016Colorful,Office2016White,Office2016Black and Office2016DarkGray.

//Sample code for setting “Office2016 Colorful” style for StatusStripEx

this.statusStripEx1.VisualStyle = Syncfusion.Windows.Forms.Tools.StatusStripExStyle.Office2016Colorful;
Me.statusStripEx1.VisualStyle = Syncfusion.Windows.Forms.Tools.StatusStripExStyle.Office2016Colorful;

Visual style for StatusStrip

Custom colors

We can also apply custom colors to the StatusStrip by setting OfficeColorScheme to “Managed” and specifying the custom color through the ApplyManagedColors method as follows.

this.statusStripEx1.OfficeColorScheme = Syncfusion.Windows.Forms.Tools.ToolStripEx.ColorScheme.Managed;
Office2007Colors.ApplyManagedColors(this, Color.DarkGreen);
Me.statusStripEx1.OfficeColorScheme = Syncfusion.Windows.Forms.Tools.ToolStripEx.ColorScheme.Managed
Office2007Colors.ApplyManagedColors(Me, Color.DarkGreen)

Custom colors for WindowsForms Status Strip

Custom context Menu

It is possible to customize the status bar context menu that displays in StatusStrip, to look like Word2007. This can be done by setting StatusString property of NotificationItems like StatusStrip Button, StatusStripLabel, so on.

this.statusStripLabel1.Text = "Pages";
this.statusStripLabel1.StatusString = "1/1";
Me.statusStripLabel1.Text = "Pages"
Me.statusStripLabel1.StatusString = "1/1"